39,564 questions
Best practices
0
votes
1
replies
34
views
What other paths are there beside file paths and xpath?
I have to make a design decision. I need to describe paths across hierarchical network graphs. In other words: There can always be a next parent, but we don't know. There can also be always a next ...
0
votes
0
answers
45
views
Dynamically Naming ID in XPath
I admit I am an XPath novice and I have Googled my face off on this topic so please be gentle. Is it possible to dynamically name identifiers without using XSLT, Java, or Python?
Incoming data ...
1
vote
4
answers
90
views
Modal Popup - Selenium/Python
I am automating a confirmation request, and my code gets me all the way to the end, but when it comes to actually confirming my reservation, there is a popup modal window that appears as a layover on ...
-1
votes
2
answers
96
views
How to find this HTML element with Selenium/Java
I've tried several ways, but I just cannot seem to get Selenium to resolve to this HTML element on a page:
<button class="btn__primary--large from__button--floating" data-litms-control-...
1
vote
1
answer
60
views
Xpath doesn't see text inside paragraph [duplicate]
Xpath doesn't work for text() for paragraph() content but works fine for div.
Example:
<div>
<p>
123
123
some_text
</p>
<div>
Xpath:
//*[contains(text(), 'some_text')]
Result:...
3
votes
1
answer
54
views
Execute xpath having column name into a variable
I need to extract data from a XML column in SQL Server 2016, for this example I'll create a XML variable, but in the real scenario the XML in inside a table so it is not editable.
This is a sample of ...
2
votes
0
answers
62
views
how to use xpath in java when namespace prefixes are unstable [duplicate]
I need to extract small parts from xml files in Java. I would like to use xpath for it.
The incoming xmls use namespaces but the prefixes for them are unstable. I mean sometimes I get "<s:...
0
votes
0
answers
43
views
Pivot data in XPath 1.0 Repeating Section
I have an issue in XPath 1.0 where my data is broken up across multiple rows for a single S/N. I need this data pivoted into multiple columns. My sample XML
<?xml version="1.0" encoding=&...
-1
votes
1
answer
81
views
Turning xml file into dataframe
I'm trying to extract data from an xml file. I'm extracting the nodes separately with the following code:
entity_uin <- xml_text(xml_find_all(xml, ".//Entity/EntityUin"))
entity_name <-...
1
vote
0
answers
50
views
Select element with a specific class
The HTML class attribute is a whitespace-separated list. E.g.,
<div class="aaa bbb ccc">
...
</div>
Is there a simple XPath expression that selects all div-s with class aaa (...
1
vote
4
answers
76
views
Python Selenium always return first result
I would like to read all the details about the ads on page
https://www.nepremicnine.net/oglasi-prodaja/gorenjska/kranj/kranj/stanovanje/letnik-od-1980-do-1989/
When reading the element "//div[@...
0
votes
0
answers
54
views
ADMX / XML split based on filtering criteria
today i was looking to the ADMX files of Anydesk. I was trying to upload them to Intune to be able to configure some policies, but there is a size upload limit and I'm exceeding it. I was looking to ...
-1
votes
2
answers
68
views
How to get the actual XPath-ID of 3 elements with the same name [closed]
How can I do it in the Playwright test that the test is going through when it finds several data elements with the same name. In the code, there are 3 elements with the same "data-cy" names, ...
0
votes
1
answer
56
views
Unable To Interect with element in div || Selenium
keyword_input = wait_for_element(
driver,
By.XPATH,
'/html/body/div[12]/div[2]/div/div/div/main/form/div[14]/div/div[2]/input',
description="Keyword input field"
)
if ...
1
vote
2
answers
75
views
Is there simpler way to get all nested text inside of ElementTree?
I am currently using the xml.etree Python library to parse HTML.
After finding a target DOM element, I am attempting to extract its text. Unfortunately, it seems that the .text attribute is severely ...
0
votes
1
answer
75
views
Issue with Locating groups_id Field in base.view_users_form for Odoo
I am encountering a persistent validation error while trying to customize the res.users form view in my custom module for Odoo 17 and 18. The error message is:
Validation Error
Error while parsing or ...
1
vote
1
answer
99
views
Set default value for date field in portal odoo18
In Odoo18, I created template for a portal user which inherit another template, In my custom template, I want a date fields 'birthday' to be auto filled
<t t-set="last_app" t-value="...
0
votes
1
answer
308
views
How to grab SVG element in Playwright/TS or Cypress? [closed]
I need to select any child element of SVG component, it can be rect, text, defs etc.
I am trying it with playwright. I tried this
const elementsCount = await page.locator("//*[local-name()='svg']&...
0
votes
1
answer
32
views
Python ElementTree iter() method using XPath
I have the following XML element:
<Content>
<Controller Use="Context" Name="Base_Project_Maximum_Connections">
<DataTypes Use="Context">
<...
0
votes
1
answer
39
views
XPath : Find duplicate element values within the parent and not the whole XML
I am trying to find the duplicate country in the following xml
<Forms>
<Form_1>
<Country>AFG</Country>
<Country>AFG</Country>
<...
0
votes
0
answers
41
views
unable to apply an xpath expression to a map object using jaxen
Hi I am having an xpath expression "infoList//groupId" which i am trying to apply on a java bean object using jaxen api . however it is returning empty results.
The following is my class
...
0
votes
1
answer
33
views
Cannot compare xs:integer to xs:string - suppress error at XPath compile time
I am using Saxon 9 in Java to compile XPath expressions like this:
net.sf.saxon.xpath.XPathEvaluator.compile(expression)
I am aware of the changes between XPath 1 and XPath 2, so I am not surprised ...
-1
votes
1
answer
37
views
XPath element not Found
Following is the code to access element using Xpath on the Website (https://web.sensibull.com/option-chain?tradingsymbol=NIFTY&expiry=2025-03-20 )
Using XPATH, I can reach the DIV which inherits ...
1
vote
1
answer
102
views
Why am I getting an element not found error when my xpath locator is correct?
I am trying to use the explicit locator strategy in the Selenium Robot library to find an element:
Click Element xpath://*[@id="sidebar-nav"]
I can locate the element using this xpath on ...
0
votes
2
answers
53
views
Webelement.findElement().getText() giving null value
My Ecommerce webpage has some products. To add a specific product to cart, I am first fetching the list of products, then iterating this list, and then fetching the product-name text, so that I find ...