-
Notifications
You must be signed in to change notification settings - Fork 3
/
Locator-Examples.txt
33 lines (30 loc) · 1.08 KB
/
Locator-Examples.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
XPATH EXAMPLES:
//h2[starts-with(text(),'The View')]
//div[@id='search']//div[position()=2]
//link[starts-with(@href, '/Content/HtmlTemplates/')]
//td[contains(@A,'t')]
//div/following-sibling::div
/html/body/.../.../.../td
//td[contains(text(),'service')][last()]/following-sibling::td[2]
//input[@id='nameOfID']//a[text()='exampleText']
.//*[@id='guest_personal_details']//button[contains(text(),'Continue »')]")
//span[text()='Reference no:']/following-sibling::span
//a[contains(text(),'Not registered? Click here to create an account »')]
//input[contains[@id, 'email']
//input[contains[@class, 'email']
//input[contains[@name, 'email']
//form/input[last()]
//form/input[last()-1]
//label[starts-with(text(), 'keep')]
//label[starts-with(@class, 'keep')]
---------------------------------------------------------------------------
CSS EXAMPLES:
input#find_top
input.btn
.input
input[id=’find’][type=’button’]
form input:nth-of-type(1)
form > input:nth-of-type(1)
input[id^=’qui’] //starts with
input[id$=’qui’] //ends with
input[id*=’qui’] //wildcard will find all