Hello I just start using selenium with java framework : I have this case : I need to count all the check boxes in my view which contains multiple pages (1,2,3) and in each web page i have a bunch of check boxes with the same xpath with different number see the exemple below: xpath fir the second checkbox in
Tag: xpath
Scrapy Python can‘t extract links with more stable xpath
I‘m Building a scraper for this website. I‘m using Python and scrapy Shell to extract the data that I want: xpath would be: //a[@class=“sb-card sb-card-company site-1×1 with-hover]/@href“ Using response.xpath(‘//a[@class=“sb-card sb-card-company site-1×1 with-hover]/@href“‘ returns [] I tried using contains(@class,“sb-card-company“) with the same result. Using other containers in the same way, changed nothing. Using a different page also had no effect. Using
Xpath: How to check if a tag comes before text or after text?
Assume I have the following two example pieces of HTML: <p>This is some text: <b>ABCD12345</b></p> <p><b>Name:</b> John Doe</p> I’m able to separate the <b> and non-<b> parts, but I (also) want to know how to determine whether the <b> part is at the start or at the end of the text (in other words; whether it has text before or
How to get dynamic numbers using xpath?
How do I get dynamically changing numbers in the span block ? Method: I can’t figure out how to do this. My method xpatch which returns the value: How can I get dynamically changing numbers in such blocks for further comparison? Answer byRaetUSD is a webelement you should call getText to get the text or you can call if element
Python/Selenium – “no such element: Unable to locate element”
I’m having a really hard time locating elements on this website. My ultimate aim here is scrape the score card data for each country. The way I’ve envisioned doing that is to have selenium click list …
Python selenium: finding multiple elements with partially different names
I have a webpage full of elements that consists below example (gave 2, the webpage consists of around >10), I want to search for all of the below elements containing ‘suda-data’ and click on all of …
How do I delete/exclude selected children nodes from the parent node in Selenium/Python?
Say, I’d like to get the article without to_del (could contain 0 or several elements). Seems driver.execute_script is the solution. But how to code it? article = driver.find_element_by_xpath(“//…
How to use the WebDriverWait() to access the value of the next element having the same class names in selenium python
I am trying to access the values of both the fields Year and Quarter from this particular site. With the help from one member of StackOverflow, I was able to implement the code for the year part, now …
clicking not working after pass text file in python selenium xpath for dropdown menu
I have a text file which contains all text for an dropdown list. I am trying to select text from the dropdown list those only exist in my text file. I tried this but didn’t work f = open(‘address….
Convert ReadyAPI xpath for use in Python 3
I’m having trouble converting xpath expressions that I use in ReadyAPI for use in Python 3 with the lxml library. I’ve read the lxml documentation but I’m not getting the same results. Here’s my XML: &…