Selenium no such element error

Asked 2 years ago, Updated 2 years ago, 41 views

Hello I'm a student trying to crawl from Python to Selenium.

I'm going to click on the era illustrated in the Asahi Newspaper Database. Attempting to access via xpath.

First of all, xpath is two

I tried to copy and run it, but I keep spouting the no search element error.
And I tried 'nav_tab02' instead of xpath, so I tried 'nav_tab02' and there was an error. (I didn't know, so I tried 'nav_tab02' and it was the same.)

My code is as follows.

import time                        
from selenium import webdriver     
from selenium.webdriver.common.keys import Keys                                   
path = ('D:/downloads/chromedriver.exe')                           
driver = webdriver.Chrome(path)                
driver.get('https://database.asahi.com/login/login.php')               
print ('Login complete!')               
driver.implicitly_wait(5)           
time.sleep(5)            
category01 = driver.find_element_by_xpath('//*[@id="nav_global"]/tbody/tr[1]/td[2]')         
category01.click()         
print ('Generation Selection Completed')              

Is there anyone who can help me?
The code to log in to Naver in the same way succeeded, so I'm more curious about what I'm doing wrong :)
Thank you for reading it.

selenium python

2022-09-21 16:29

1 Answers


2022-09-21 16:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.