Skip to content

How to click the “SYSTEM” button on the dashboard using Python’s Selenium

After clicking on the “SYSTEM” button in the title, I want to click on the “Import” button to transition to the page, but I get an error because I can’t find the element.
How do I resolve the error?

The corresponding code in Python is shown below.

system_btn = wait.until(EC.element_to_be_clickable((By.XPATH, "//li[@id='menu-magento-backend-system']")))
system_btn.click()

The error details are presented below.

Traceback (most recent call last):
File "C:Users204158AppDataLocalTempipykernel_56161284163066.py", line 62, in <module>
import_btn = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="menu-magento-backend-system"]/div/ul/li[1]/ul/li[1]/div/ul/li[1]/a')))
File "C:Users204158AppDataLocalminiconda3libsite-packagesseleniumwebdriversupportwait.py", line 95, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: