I want to scrap investing.com website. Firefox Webdriver closes when clicking on one of the dropdown list item. Dropdown menu is hiidden. I want to choose "BİST Ulusal Tüm" item. What can i do?
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
driver = webdriver.Firefox()
url = "https://tr.investing.com/equities/turkey"
driver.get(url)
driver.implicitly_wait(5)
WebDriverWait(driver, 1).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="index-select"]'))).click()
WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="index-select"]/div[2]/div/div/div[6]'))).click()
