I have written a selenium data driven code, which will fetch data from the excel file and will ,fill up in the web page. the Webpage contains
- drop downs for Country ,State and City,
- Text Field 1 and Text Field 2
- Add/update Button and Clear Button
Steps
1-select country,state,city ,enter text field 1 and Add/Update button.
Issue
When I perform above action, when Add/update is clicked ,I want page to wait until again starting the loop ,so that the country drop downs resets again. as of now it is not waiting and causing even a new country is selected the state drop-down shows previously selected country's provinces.Example(If I select India and provinces for the 1st record, than next time for United states the "State-drop down" displays ,Indian States but not the United States"
I tried using wait until technique even the driver.manage().timeouts().implicitlyWait(20, TimeUnit.MILLISECONDS)
, even thread.currentthread.sleep
but none of them are consistent as after some records I am getting error as element not found because of the above mentioned issue.
I want post Add/update button is clicked the driver to wait till it again resets the page with default value of the country set Secondly when I pass a value for the country the driver again to wait so that it can load it corresponding States .