Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98369

Even though the page loads, dropdown elements doesnt get loaded. Webdriver waits and Javascriptexecutor dont work

$
0
0

I tried to open a page using selenium automation using Java. The page loads normally but dropdown select options are not listed. there is an empty dropdown present. I need to select the elements from the dropdown after a particular element is clicked. Below is a sample code to verify the same.

//Verifying Fixed Camera Position table
        if (driver.findElement(By.id("R checkbox id")).isDisplayed()){
            checkOrUncheck(By.id("R checkbox id"), true); // This method either performs a check or uncheck if the checkbox element. There is no issue with this method.
            waitforelementpresent(By.id("R checkbox - dropdown"));
            softAssert.assertTrue(driver.findElement(By.id("R checkbox - dropdown"))).isDisplayed(),"Camera Position value selection is not displayed"); //In this line we are trying to check whether a dropdown is displayed after a checkbox is selected.
        }

Here my issue is: after the page loads, checkbox is checked using selenium code, but the dropdown is not displayed. I tried webdriver waits(Implicit, explicit, fluent and thread.sleep), nothing worked. I also used Javascript Executor to check whether the page loading is completely done based on the answer given in this question. none works.

Please help me to get a solution for this so that the dropdown loads after the checkbox is checked.


Viewing all articles
Browse latest Browse all 98369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>