'Selecting dynamic react dropdown in python selenium pytest
Hi i am trying to select a dynamic dropdown built in react while making a python selenium pytest framework. I am facing an issue in first sending keys in the dropdown so options are loaded and then selecting particular option. The dropdown database is very huge as it consists values for certain big organisations, hence 3 words are required so as to load specific values. Also if anyone can let me know how to let driver wait in page object model.
Solution 1:[1]
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
url=........
ser = Service(seleniumpath)
driver=webdriver.Chrome(service = ser)
driver.get(url)
WebDriverWait(driver, 7).until(lambda x:x.find_element(By.CSS_SELECTOR,'title'))
#By support XPATH CLASS_NAME CSS_SELECTOR ID........
#7 within the second time finding the elements
driver.close()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | GURU KT |
