Skip to main content

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
0 votes
0 answers
11 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 ...
Charles's user avatar
  • 23.1k
-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 ...
Faim Sohail's user avatar
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 ...
phat nhat's user avatar
0 votes
1 answer
34 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 ...
Ade Teriba's user avatar
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 ...
narwahl's user avatar
  • 99
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-...
Fazlan Fawmy's user avatar
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 ...
Lagencie's user avatar
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-...
Jan Krupa's user avatar
  • 506
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 ...
codenamezero's user avatar
  • 2,950
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 ...
Kaka's user avatar
  • 1
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 ...
evenevaa's user avatar
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 ...
Erstuuj's user avatar
  • 11
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>...
RedX's user avatar
  • 15.1k
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'...
user76864978's user avatar
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&...
ScottyCov's user avatar
0 votes
1 answer
37 views

Extracting the text between span tags in a Javascript-rendered page using Selenium in Python

I am trying to scrape all instances of text between tags with a particular class on a web page that dynamically updates. I am using selenium with a chrome WebDriver in Python. In a normal browser, ...
zicari's user avatar
  • 5
0 votes
1 answer
23 views

How can I add additional tagged vlans when using virt-install to create a guest?

I'm unable to figure out the XPath syntax to add a second tagged vlan when using virt-install to provision a guest: srv01:~$ sudo virt-install\ --name=ds-controller01.iwc.ig24\ --disk source.dev=/...
FrozenCryptid's user avatar
0 votes
0 answers
24 views

Extract all data inside g tag of JS chart using Selenium

I am currently trying to scrape a local web page, generated by my EV charger. I access it through it's IP address, which requires me to sign in. After signing in, I want to retrieve the data from the ...
DvdV's user avatar
  • 77
0 votes
2 answers
55 views

Postgresql - XML- Processing xpath with date comparission

I have ingested XML file in Postgresql DB and I trying to perform XPATH operation on the field with date comparison but it is not working. From Postgresql official site I found out that Postgresql ...
The6thSense's user avatar
  • 8,315
0 votes
1 answer
82 views

click() method from element object (HtmlUnit) is doing nothing

I am trying to crawl on this website: https://www.softpedia.com/get/Programming/Other-Programming-Files/Apidog.shtml using html unit. I want to "click" on "Download now" button, it ...
Daniel Reuveni's user avatar
-1 votes
1 answer
41 views

Handle submenu items from a drodown

I want to locate the elements from sub menu i am trying to locate print but couldn't. how can i fix this? My code WebDriver driver = new FirefoxDriver(); driver.get("https://www.flipkart....
Srinivasulu 's user avatar
0 votes
1 answer
40 views

Virtualizing XML-based API using WireMock

I'm trying to virtualize an XML-based API using WireMock and generate a JSON response using wiremock standalone jar. The requirement is to copy a tag value from the XML request payload to the JSON ...
ANZAR AHSAN's user avatar
0 votes
1 answer
92 views

A condition on whether an element exists with Python Selenium

I am trying to capture a text from an element which might have two XPaths, but I can't make it happen. I have tried all of the below methods with no luck and I'm getting this error when running my ...
Arash's user avatar
  • 1
1 vote
2 answers
47 views

find an element by Xpath using selenium Java

import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui....
Kamilia Bouras's user avatar
0 votes
1 answer
44 views

XSLT - Find most recently _closed_ prior element

xslt 1.0 I am afraid. I have access to exslt. I am otherwise looking to try to avoid using extension functions. I need to find the most recently CLOSED xslt element of a particular type, rather than ...
tolanj's user avatar
  • 3,659
0 votes
0 answers
34 views

Read values into a List<string> or DataTable from a Agnostic Grid using Selenium C#

I'm trying to read an Agnostic Grid on a web page using selenium c# and want to store the Text based on the column name. I'm not that great fan of DataTable so I preferred List over DT. Problem: The ...
StackUseR's user avatar
  • 958
-1 votes
1 answer
53 views

XPath Python Error: The 'list' object has no attribute 'xpath'

I'm brand new to Python and web scraping and cannot figure out what is wrong with my code for the life of me. Is it because I'm scraping just one element and not a list? I've checked my XPaths so many ...
Jamie Vergano's user avatar
0 votes
1 answer
38 views

How to parse XML in Google Sheet?

This URL https://export.arxiv.org/api/query?id_list=2308.05734 contains the xml below. <?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom&...
TSR's user avatar
  • 19.5k
1 vote
1 answer
33 views

How to get parent element by the contents of two child elements?

I have a list of events with the following contents: <div class="all-ebents"> <div class="sport-base-event"> <span class="event-block-current-...
Ethical Hacking's user avatar
1 vote
2 answers
93 views

How to properly concatenate multiple XPaths and how to add spaces between them?

I'm trying to create my own personalized RSS Feed for an Italian institutional site. The site in question is this, belonging to an Italian municipality. The idea would be to use the PolitePol online ...
Migatte's user avatar
  • 61
0 votes
0 answers
42 views

How to find xpath to be used for panos arbritary code execution?

I used burpsuite to retrieve the requests by intercepting it but I do not see xpath instead, i see xpathid. I am not sure if the xpath is /system-general/login-banner, since it gave an error message: ...
sjj's user avatar
  • 23
0 votes
1 answer
32 views

xmllint --xpath for <rdf:RDF><channel><title>

I have looked through every answer in these first three search pages and cannot get a solution; after page 2 questions aren't even relevant. In this RSS feed: <?xml version="1.0" encoding=...
Jesse's user avatar
  • 816
1 vote
0 answers
33 views

XPath doesn't take any effect without throwing any errors

I want to make a button in 2 of our views only visible to users of a specific group. In the sale.order view everything works as intended. There is similar view in the account.move model which I ...
pycal's user avatar
  • 11
0 votes
1 answer
47 views

Cannot extract element xpath from docx

With python-docx-oss I use the following code (I want to write the Heading 3 style to a TXT file and include only the outline/level of numbering that is level 3, i.e. x.x.x): from docx import Document ...
Booger21's user avatar
2 votes
2 answers
131 views

XPath for colspan attribute values as browser understands them?

I have a HTML table with possibly missing or malformed colspan values: <table border="1"> <tbody> <tr> <th>A</th> <th>B</th> <th>C</...
Fravadona's user avatar
  • 15.7k
1 vote
1 answer
38 views

HTML XPATH, get aunt/uncle html

I was able to get access to the tag that contained CSCI 12 "//span[contains(., '" + CSCI + "') and contains(., '" + 12 + "')]" but im stuck trying to access the parents ...
Shabir Zahir's user avatar
1 vote
1 answer
63 views

How to get an attribute as an integer >= 1 with XPath?

Consider this input: <tr> <td /> <td rowspan="3" /> <td rowspan="-2" /> <td rowspan="*8#%@!" /> <...
Fravadona's user avatar
  • 15.7k
0 votes
0 answers
22 views

How can I iterate through a table using selenium using XPATH to click a button that has the same XPATH in each row?

I am trying to scrape all the history information for some results in a table online. To do this, I need to click the "History" button on each row, which redirects to another page, then ...
Gry's user avatar
  • 23
0 votes
2 answers
58 views

Unable to click an element and scrape web using xpath and id- selenium

I have been trying to create a code to select an element on a web page- https://tmrsearch.ipindia.gov.in/eregister/ using xpath and element id with the help of Selenium library. I have mentioned two ...
Onkar Mehra's user avatar
0 votes
1 answer
42 views

fn:parse-json and NUL bytes in XPath

I know that XML doesn't allow NUL bytes in it, but I though that it would somehow work with JSON: parse-json("""\u0000""") => serialize(map{"method": "...
Fravadona's user avatar
  • 15.7k
0 votes
2 answers
124 views

Programmatically generate an array containing `null` values with XPath 3.1

I have a map representing a gaped array; the keys being the indexes of the array: let $m := map{1: "val1", 2: "val2", 5: "val5", 7: "val7"} return Now I would ...
Fravadona's user avatar
  • 15.7k
0 votes
0 answers
46 views

How to create a correct XPath for this site?

I have this website https://firenze.bakeca.it/annunci/tutte-le-categorie/luogo/Fucecchio/ from which I would like to gather information. The information I need is the price, the links, the description,...
eofficecom com's user avatar
0 votes
0 answers
38 views

XPath not handling self-closing tags

I am trying to make an XPath path to describe a node in html. This node contains a self-closing tag and that is making my XPath not work. Am I doing something wrong or is this a bug in the xml2 ...
G5W's user avatar
  • 37.3k
1 vote
3 answers
50 views

Selenium XPath: How do I click on the Load More button

I'm trying to scrape job listings on a career page. I'm trying to click the load more button, but cant seem to figure it out. i was wondering if someone could help me out -- I keep getting an error ...
redhorse's user avatar
1 vote
1 answer
55 views

XML output from SQL Server based on header and details

I have these table values: ID MARKS TOTALMARKS SUBJECT CODE 3789 15 40 Science SC 3789 25 40 Math M 3932 14 48 Science SC 3932 34 48 Social SO 3957 42 42 Math M 4871 11 31 Eng E 4871 20 31 ...
SATHK's user avatar
  • 55
1 vote
1 answer
32 views

XPath expression for finding subsequent elements that have the same tag name

Here is a sample XML: <Body> <Subsection lims:inforce-start-date="2018-12-15" lims:fid="170842" lims:id="170842"> <MarginalNote lims:inforce-start-date=&...
Gabriel 's user avatar
-1 votes
1 answer
156 views

How to locate an element by Xpath/CSS selectors using Playwright

How to locate an element by Xpath/CSS selectors using Playwright TS/JS? There are many locators in Playwright (in comparison to Selenium) such as getByRole and getByText. Is there any locator like ...
I.sh.'s user avatar
  • 1,325
0 votes
0 answers
146 views

Result throw Namespace prefix 'ext' is not defined

I tried to add XmlDsigXPathTransform to reference but the code signedXml.ComputeSignature() throws an error Namespace prefix 'ext' is not defined This is the code: //Generate the xmlDoc AXG_Invoice....
Ryan's user avatar
  • 1
1 vote
1 answer
107 views

How to troubleshoot XPath not finding elements on a web page?

I am using a Bash script to search a web page with a specific XPath expression: # Define variables for the URL and browser sGDomain="idealista" sGCitta="fucecchio-firenze" sGTypo=&...
eofficecom com's user avatar
0 votes
1 answer
57 views

How to generate a JSON string with XPath 3.1

I have some text in a node, for example: <xml>&lt;Hello world "&amp;" foo bar&gt;</xml> I would like to process string(/xml) and JSON-escape it so that the result ...
Fravadona's user avatar
  • 15.7k

15 30 50 per page
1
2 3 4 5
790