Difference between revisions of "IT-SDK-Xpath"

From wiki.samerhijazi.net
Jump to navigation Jump to search
Line 1: Line 1:
 +
=Links=
 +
* https://pombuilder.com/
 
* src: https://www.guru99.com/xpath-selenium.html
 
* src: https://www.guru99.com/xpath-selenium.html
 
* src: http://www.webdriverjs.com/protractor-element-locators/
 
* src: http://www.webdriverjs.com/protractor-element-locators/
 +
=Muster=
 
<pre class="code">
 
<pre class="code">
 
Html=<tagename attribute='value'></tagename>
 
Html=<tagename attribute='value'></tagename>

Revision as of 11:37, 23 July 2020

Links

Muster

Html=<tagename attribute='value'></tagename>
Xpath=//tagname[@attribute='value']
-------------------------------------------
//:		Select current node.
tagname: 	Tagname of the particular node.
@:		Select attribute.
attribute: 	Attribute name of the node.
Value:		Value of the attribute.
-------------------------------------------
Xpath=//input[@name='uid']
Xpath=//*[@class='barone']
Xpath=//*[text()='Testing']
...
Xpath=//*[contains(@type,'sub')] 
Xpath=//*[contains(text(),'here')]
...
Xpath=//*[@type='submit' or @name='btnReset']
Xpath=//*[@type='submit' and @name='btnLogin']
..
Xpath=//label[starts-with(@id,'message')]
Xpath=//label[text()='UserID']
...
Xpath=//*[@type='text']//following::input
Xpath=//*[@type='text']//following::input[1]
...
Xpath=//*[@type='submit']//preceding::input
Xpath=//*[@type='submit']//preceding::input[1]
...
Xpath=//*[@id='java_technologies']/child::li
Xpath=//*[@id='java_technologies']/child::li[1]
Xpath=//*[@id='rt-feature']//parent::div
Xpath=//*[@id='rt-feature']//parent::div[1]
Xpath=//*[@id='rt-feature']//descendant::a