0

this is the website: http://money.finance.sina.com.cn/bond/quotes/sh175694.html

And I tried:

driver.find_element_by_xpath('//div[@class="title tit06"]/a').click()

OR

driver.find_element_by_xpath('(//a[@class="more more_links"])[1]').click()

Neither is working and returns: no such element: Unable to locate element:

Any help will be appreciated!

Thanks!

Here's more :

url = 'http://biz.finance.sina.com.cn/suggest/lookup_n.php?country=&q=%09175708'
driver.get(url)
driver.implicitly_wait(10)
driver.find_element_by_xpath('(//div[@class="list"])[2]/label/a').click()   
driver.implicitly_wait(10)
driver.find_element_by_xpath('//div[@class="title tit06"]/a').click()
Joyce
  • 435
  • 4
  • 13
  • Are you sure that the xpath is exactly correct? Try executing something that you know works with that xpath to see if you get the same error; if so, you will know there is an issue with the xpath (perhaps a simple typo?). Also, please show us more of your code. – Randall Arms Feb 05 '21 at 12:21
  • 1
    In my case, all works fine. I used Firefox – dimay Feb 05 '21 at 12:25
  • @Cathy Which link? Update the quesion with the text based HTML of the element. – undetected Selenium Feb 05 '21 at 12:33
  • Please find my updated whole codes here, the error says` NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@class="title tit06"]/a"} (Session info: chrome=88.0.4324.104)` – Joyce Feb 05 '21 at 12:57
  • @DebanjanB there's already a link in it, thanks – Joyce Feb 05 '21 at 12:58
  • Umm, I think there's window handle's thing as I jumped more than one links – Joyce Feb 05 '21 at 13:02
  • thank you all for helping look into it, fixed when jumped window -1, thanks! – Joyce Feb 05 '21 at 13:09

0 Answers0