Questions tagged [xpath]
The primary purpose of XPath is to address parts of an XML document. It also provides basic facilities for manipulation of strings, numbers and booleans. XPath uses a compact, non-XML syntax. XPath operates on the abstract, logical structure of an XML document, rather than its surface syntax.
xpath
39,486
questions
0
votes
0
answers
9
views
Imposter - xPath not valid for capture?
The docs have this example:
- path: "/users"
method: POST
capture:
petName:
xPath: "/env:Envelope/env:Body/pets:animal/pets:name"
store: testStore
...
-3
votes
0
answers
12
views
I am getting "org.openqa.selenium.ElementNotInteractableException" this error while performing actions on calender
I am getting "org.openqa.selenium.ElementNotInteractableException" this error while performing actions on calender
I am trying to perform actions on the calender popup screen (Selecting ...
1
vote
0
answers
12
views
Clarification about how 'Relative XPath' actually work? [duplicate]
I've read a lot of documents related to Absolute Xpath and Relative XPath, but I still have no idea how Relative XPath works, for Absolute Path, an element can be found from the root based on the ...
0
votes
1
answer
32
views
Get result with Xpath Expression to be used in java code
I'm unsure why I am not receiving a result for the xpath expression in the image below. I am trying to select the <circle> tag to execute a test step in my Selenium Java test script. I have ...
0
votes
2
answers
28
views
XPath 1.0 predicate with number function doesn't match all nonzero values in XSLT input
I'm using the xsltproc command and getting unexpected output from a predicate using the number() function. I'm trying to use number()'s output as a boolean, with 0 treated as false and all other ...
0
votes
1
answer
27
views
How to get Tag inner text and Attribute value in the same loop and row HtmlAgilityPack C#
Following is the HTML i am working on; (C# project)
</TR>
<TR>
`<TD ALIGN="center"> <INPUT TYPE="checkbox" NAME="f0" VALUE="14652 4-76-...
1
vote
1
answer
41
views
XPath search with text containing soft hyphen
/div[contains(text(),"Inverter")]
This is the code that we currently used to map some objects in selenium with xpath. The problem now is, that they introduced soft hyphens now into their ...
1
vote
1
answer
36
views
How to fix "XPath syntax error: Invalid expression" when using etree.XPath in Python while using union operator "|"
I'm trying to compile an XPath expression using etree.XPath in Python, but I'm encountering a syntax error. Here's the code snippet:
XPATH = '//bridge-domain/(bridge-domain-group-name|bridge-domain-...
0
votes
2
answers
39
views
How to register default NS in libxml2 for C++?
Question: What is the correct way to register the default NS for XPath context?
I've gone through numerous posts (mostly non-C++ and Google search) about registering NS, but I cannot find anything for ...
0
votes
0
answers
24
views
Sign in - Google accounts (choose a account) - Cant seem to be able to click the account (python selenium)
Its the page where you choose which account to login with on a website. I have a hard time clicking the account element. I have no idea if im writing the wrong path or it has something to do with a ...
0
votes
0
answers
21
views
Selenium XPATH for Google general search - how to improve results
I wrote a Python program to run a Google search for each company name in an Excel sheet. However, I get a lot more search results when manually searching the company names up on google.
I suspect it's ...
1
vote
0
answers
43
views
injection on second user fails
I am trying to execute an xpath injection in golang, I am at the point where I can extract data through the injection from the first user in the xml file ' or position()=1]/*[2]|/a['. However from the ...
2
votes
2
answers
60
views
XPath with nested condition using outside element value
My XPath foo is not yet good enough to figure out how to do the following.
I have an XML that's similar to:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<books>...
1
vote
1
answer
40
views
Add column name as XML node and join with other table
I am trying to query table column names as values of the XML Nodes and in the same node add values from the other table. I have found a code in other post that can create nodes from column names but I'...
1
vote
1
answer
26
views
How do I get text in Selenium when the text isn't neatly enclosed within a tag?
<td data-title="Docket No.">"3228"
<div class="cursor-pointer expand-collapse-container expand-document-name">
<div class="expand-arrow&...