I have a form which has two drop-down menu say A and B. Contents of drop-down B is dependent on the selection of drop-down A.
The form uses AJAX to load the contents of drop down B.
I am using selenium and python to automatically select the drop down. I am able to select the drop down A but due to the use of AJAX my code is not working for selecting the content of drop-down B.
I have searched the selenium documentation (Explicit wait) and some stackoverflow answers but still I am unable to implement it in python. I am a newbie in python and selenium so please bear me.
Here is a small portion of my code :
#District selection DROP-DOWN A
district=Select(driver.find_element_by_id("ddlDistrict85"))
district.select_by_value("1")
#SRO selection DROP-DOWN B
# I Need EXPLICIT WAIT logic here to wait till the entire drop-down B is loaded
sro=Select(driver.find_element_by_id("ddlSRO85"))
sro.select_by_value("1")
Suggest some logic to wait till entire drop-down B is loaded.