GetAttributeFromElementAsync

Parent Previous Next

GetAttributeFromElementAsync

Описание: метод возвращает строчное значение из указанного атрибута в выбранном элементе

Синтаксис

GetAttributeFromElementAsync(string by, string locator, string attribute)

GetAttributeFromElementAsync(Locator locator, string attribute)

Возвращаемое значение: строка (string)


Пример:

string value = await tester.GetAttributeFromElementAsync(Tester.BY_CSS, "input", "name");

string value = await tester.GetAttributeFromElementAsync(Tester.BY_XPATH, "//input", "name");


string value = await tester.GetAttributeFromElementAsync(tester.GetLocator("locatorName"), "name");

Created with the Personal Edition of HelpNDoc: Full-featured EBook editor