All Questions
6,876
questions
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
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
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&...
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, ...
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 ...
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 ...
-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 ...
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
...
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 ...
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 ...
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 ...
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 ...
0
votes
1
answer
48
views
I have created a script to check a checkbox. After clicking on the checkbox, a new tab opens, but the checkbox remains unchecked
I want to automate the signup process but I'm unable to check the box using Playwright. Each time I click on the checkbox, I am redirected to a new link. In the DOM, when the checkbox is checked, the ...
0
votes
0
answers
41
views
How to split a (sysrepo, netconf) xpath into a json object
I am working with NETCONF and Sysrepo. When a change is made in the sysrepo managed configuration, it gives a call back so that the corresponding change can be effected in the underlying hardware. The ...
0
votes
2
answers
86
views
The directly pasted XPATH of a link into selenium is leading to another link
I am automating the login and profile completion of a Linkden profile. I have been able to get to the home page and past the login page. I am trying to go to the profile page by simulating the click ...