Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save KrishnB/fa1847e50a1931d9c80dd989061e3f0b to your computer and use it in GitHub Desktop.
Save KrishnB/fa1847e50a1931d9c80dd989061e3f0b to your computer and use it in GitHub Desktop.
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 2.
Abbreviation, Generates a By statement to find locator using, Generated Code
mpf, Declare locators for multiple platforms - Android,iOS,Web, Responsive Web, MultiPlatformFinder locator = finder(queryByContentDesc("test-Username"), queryByName("test-Username"));
qba
attribute
private By locator = queryByAttribute("attribute", "value");
qbc
class name
private By locator = queryByClass("class");
qbcd
content description
private By locator = queryByContentDesc("test-Username");
qbi
id
private By locator = queryById("id");
qbn
name
private By locator = queryByName("q");
qbt
text
By locator = queryByText("text");
query
css or xpath
By locator = query("input[value='Google Search']");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment