Questions tagged [findelement]

180 questions
0
votes
1 answer

Unable to locate 3rd div element

driver.find_elements(By.XPATH, '/html/body/div[1]/div/div[6]/div[1]/div[2]/div[2]') The above element is returned by the selenium chrome driver but the below element (div with main-content-row class) is not. driver.find_elements(By.XPATH,…
0
votes
1 answer

How to get an element within an ArrayList of elements using Selenium Java

I have an array list in Java that gives me a list of machine names as below: By mNameUIList = By.xpath("//div[@class='machineblockdiv cursorpointer machinblockheight']//h4"); ArrayList mUITextList =…
0
votes
2 answers

Seleneium Python shows DeprecationWarnings with driver.find_element_by_xpath()

Okay, so I am working on my laptop rn and I copy and pasted my code from my PC and suddenly it's not working. I have installed the same Selenium but now it is acting up, I am receiving DeprecationWarnings, driver.find_element_by_xpath isn't working…
0
votes
0 answers

find_elements only locates the first result

I am trying to scrape https://edition.cnn.com/ for a school project...I define a method that gets a query as an input and I must get the title, snippet, etc. of all the articles from all the pages...I have used a for loop, but it just returns me 10…
0
votes
1 answer

Python : selenium find element angular

printscreen I tried to read this line, but it doesn't work : element = driver.find_element(By.XPATH,"//span[contains(@_ngcontent-whw-c159 data-cy,'hotel-title')]") print(element.text) Does anyone have an idea how to do this?
stako0
  • 3
  • 1
0
votes
0 answers

Python Selenium find Sibling Element after the correct table is found

there are multiple Tables on the Site with changing IDs, only the active one is Clickable, so i am test like this for the correct one: def table_test(text): rows = driver.find_elements(By.XPATH, '//table/tbody/tr/td[2]') for row in rows: …
Shark00n
  • 85
  • 1
  • 10
0
votes
1 answer

Cant find the element (xpath) in RSelenium of a specific website

I'm using RSelenium to do some web scraping on the website https://unicancer.sigaps.fr/. I want to review my team sigaps points (for those who don't know, when you publish an article in a scientific magazine, you get points and the more you have…
0
votes
1 answer

When Relative Xpath Fail? Selenium locator Xpath is reliable?

I'm doing automated tests. And I use SelectorHub to find elements in a website. In some cases I get very long Relative Xpath as you see…
0
votes
0 answers

Selenium python not selecting all information

I'm working with a table that is way too big: It has about 30 cols and it is inside a div (with horizontal scroll). I'm trying to retrieve the information by doing: driver.find_element_by_xpath('//thead/tr/th[%s]' % i).text However it is returning…
user16241255
0
votes
0 answers

Python : Clicking first google result using Selenium

I've tried almost every method of trying to click on the first result of google search. I was trying to find the element using almost every queue i've found on the net, unfurntantlly no one of them succeed. Please is there anyone who think he knows…
danielraveh
  • 11
  • 1
  • 4
0
votes
0 answers

problem finding element on web page using RSelenium

I have been trying to get the element "Excel CSV" on a web page using the remDrv $ findElements in R software, but have not been able to achieve it. how could you call the element using the xpath, css, etc arguments? i…
0
votes
1 answer

extract email from hotmail via selenium

emailcontent = [] def getEmails(self): self.browser.get("https://outlook.live.com/mail/0/inbox") time.sleep(3) content = self.browser.find_elements_by_css_selector("._2ZDUqsleGa-jar5wAYvVzV") for c in content: c.click() #…
eyup.tatar
  • 75
  • 8
0
votes
1 answer

How to write XPATH for multiple elements with the same text value with different format in selenium using java

I have one query related to writing XPATH for one scenario as described below. In Web page lets say we have a text value "Example" which is displayed/ repeated multiple times such…
Sailesh Botcha
  • 185
  • 1
  • 3
  • 10
0
votes
1 answer

Python Selenium find_element_by functions can be called in chain continuously?

I'm trying to get an access to div.y element.
I know that I can directly get the div.y element using Selenium in Python. But is it possible to call the functions like…
Justin M
  • 177
  • 1
  • 3
  • 11
0
votes
0 answers

Getting "script type" using Selenium Python

I am trying to get the cat{} values, but no luck at all. enter image description here https://www.funda.nl/en/koop/verkocht/leiden/huis-41395638-oude-vest-153/ Can you help me, please? And how can I split each cat{}, and create a new dataframe? part…