User Tools

Site Tools


xpath

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

xpath [2018/01/04 10:51]
tast
xpath [2020/10/21 14:37] (current)
montse
Line 1: Line 1:
-===== XPath object identification ===== +====== XPath object identification ======
- +
-[[doku>​wiki:​dokuwiki|{{wiki:​TAST-128_small.png }}]] +
  
 In the following lines, the user will find tips for being able to identify the web objects via XPath. In the following lines, the user will find tips for being able to identify the web objects via XPath.
Line 36: Line 34:
 |text() |Selects the elements with a specific text within |de[text()="​mg"​] |"//​de//"​ elements with the string "//​mg//"​ in the text field| |text() |Selects the elements with a specific text within |de[text()="​mg"​] |"//​de//"​ elements with the string "//​mg//"​ in the text field|
 |[ / @ ] |Selects the elements that have specific children| / / de[mg/​@attr1='​nrw'​]|"//​de//"​ elements which have a "//​mg//"​ child with an attribute "//​attr1//"​ equal to "//​nrw//"​| |[ / @ ] |Selects the elements that have specific children| / / de[mg/​@attr1='​nrw'​]|"//​de//"​ elements which have a "//​mg//"​ child with an attribute "//​attr1//"​ equal to "//​nrw//"​|
 +
 +\\  ​
 +
 +
 +
 +
 +
 +===== How to Obtain Xpath in a XML document =====
 +
 +How to obtain the Xpath of the XML node with Notepad ++:\\ \\   
 +    1. Inside Notepad++ go to Plugins then go to Plugin Manager and click in Show Plugin Manager.\\ 2. Install XML Tools.\\ 3. Restart Notepad++.\\ 4. Load your XML document.\\ 5. Place your cursor on to the node you are looking to generate the Xpath.\\ 6. Go to plugins then XML Tools and select Current XML Plath (Default Hotkey: Ctrl + Alt + Shift + P).\\ \\      ​
 +Then you have a copy of the Xpath in the clipboard.
 + 
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
xpath.1515063101.txt.gz · Last modified: 2018/01/04 10:51 by tast