FocusElementAsync
Description: the method switches focus to the specified element
Syntax:
FocusElementAsync(string by, string locator)
FocusElementAsync(Locator locator)
Return value: no return value
Example:
await tester.FocusElementAsync(Tester.BY_CSS, "input[id='login']");
await tester.SetValueInElementAsync(Tester.BY_CSS, "input[id='login']", "admin");
await tester.FocusElementAsync(Tester.BY_XPATH, "//input[@id='login']");
await tester.SetValueInElementAsync(Tester.BY_XPATH, "//input[@id='login']", "admin");
await tester.FocusElementAsync(tester.GetLocatorValue("locatorName"));
await tester.SetValueInElementAsync(tester.GetLocator("locatorName"), "admin");
Created with the Personal Edition of HelpNDoc: Create iPhone web-based documentation