-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocators.txt
77 lines (49 loc) · 1.84 KB
/
locators.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
id
name
cssSelector
Xpath
className
tagName
linkText
partialLinkText
Xpath - Firebug and Firepath - Chropath
-----------
<input type="email" class="whsOnd zHQkBf" jsname="YPqjbf" autocomplete="username" spellcheck="false" tabindex="0" aria-label="Email or phone" name="identifier" autocapitalize="none" id="identifierId" dir="ltr" data-initial-dir="ltr" data-initial-value="" badinput="false">
//tagName[@attribute='value'] - Relative Xpath, Absolute xpath, partial xpath
//input[@name='identifier'][@id='identifierId']
//input[@name='identifier' and @id='identifierId']
//input[@id='identifierId']
//*[@id="identifierId"]
//*[@id="identifierId"]
//input[@name='q']
//*[@id="view_container"]/div/div/div[2]/div/div[1]/div/form/content/section/div/content/div[1]/div/div[1]/div/div[1]
//html/
<input type="submit" class="button" value="Submit">
<input type="submit" class="button" value="Submit">`
XPATH SYNTAX
-----------------
//tagName[@attribute='value']
//tagName[@attribute='value'][@attribute='value'][@attribute='value']
//tagName[starts-with(@attribute,'value')]
//tagName[contains(@attribute,'value')]
//tagName[text()='value']
//tagName[contains(text(),'partialvalue')]
//tagName[@attribute='value']/..
//tagName[@attribute='value']/parent::tagname
//tagName[@attribute='value']/following-sibling::tagname
//tagName[@attribute='value']/preceding-sibling::tagname[1]
CSS SYNTAX
-------------------
input[id='identifierId']
input[id='identifierId'][type='email']
input[id^='identifie'] - starts-with
input[id$='tifierId'] - ends-with
input[id*='tifier'] - contains
#identifierId - id
tagName - tagName
.Xb9hP - className
input#identifierId.whsOnd.zHQkBf[type='email']
div.aCsJod.oJeWuf > div > div:first-child
div.aCsJod.oJeWuf > div > div:last-child
div.aCsJod.oJeWuf > div > div:nth-child(2)
div[jsname='dWPKW'] > div > div > div > div:nth-child(2)