I am trying to click Python present in the testlang dropdown list with id of select as lang1
but I am getting error here as selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable: Element is not currently visible and may not be manipulated
, xpath I am trying is //select[@id ="lang1"]/option[@value="3"]
website https://pynishant.github.io/dropdown-selenium-python-select.html
This is my code:
self.driver.get(
'https://pynishant.github.io/dropdown-selenium-python-select.html')
sleep(1)
self.driver.maximize_window()
sleep(2)
wait = WebDriverWait(self.driver, 20)
select = wait.until(EC.presence_of_element_located((By.CLASS_NAME, "custom-select")))
print(select)
drop = self.driver.find_element(By.CLASS_NAME,"custom-select")
drop.click()
sleep(2)
sel = self.driver.find_element(By.XPATH,'//select[@id ="lang1"]/option[@value="3"]')
sel.click()
sleep(2)