I am trying to draw data from a government website related to air quality and other statistical data. I am trying to automate the data retrieval process. However, following the entry into the data drawing page by 'Tiklama2' I was not able to click any elements.
Tiklama = driver.find_element(By.XPATH, '//*[@id="dropdown3-contentDataDowloadNew"]/div/div/div/div/span[3]')Tiklama.click()
The above code just doesn't work...
The code is below and there is no need to hide the URL or anything:
from selenium import webdriverimport timefrom selenium.webdriver.common.keys import Keysfrom selenium.webdriver.chrome.service import Servicefrom selenium.webdriver.common.by import Byservice = Service()options = webdriver.ChromeOptions()driver = webdriver.Chrome(service=service, options=options)driver.get("https://www.havaizleme.gov.tr/")driver.fullscreen_window()time.sleep(10)Tiklama2 = driver.find_element(By.XPATH, '//*[@id="Harita"]/div[1]/a[5]')Tiklama2.click()time.sleep(100)Tiklama = driver.find_element(By.XPATH, '//*[@id="dropdown3-contentDataDowloadNew"]/div/div/div/div/span[3]')Tiklama.click()driver.quit()