options = Options()
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()),options=options)
wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR,"svg > g.highcharts-exporting-group > g > image"))).click()
wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR,"ul.highcharts-menu > li:nth-child(2)"))).click()

If you want to use Options in conjunction with Service you should do it like so I used Chromedriver manager to make sure the binaries are correctly set up. From there you need to wait for the element to be clickable using Webdriver waits and then click on those elements.

  1. Implicit waits are for page loads not element finding so use explicits.

  2. Chromeoptions is depreciated along with driver.find_element_by_*.

  3. Incorrect xpaths selected.


from selenium import webdriver
from import Service
from import By
from import WebDriverWait 
from import expected_conditions as EC
from import Options
from import ChromeDriverManager

Related Query