May-28-2019, 10:06 PM
I am trying to automate filling a form on a website. There are two dropdowns like Country and States. Based on the Country selected in first drop down, the values in second drop down are loaded using Ajax.I am able to select Country in first drop down using Selenium Webdriver, but then it is not able to select State from second drop down.. Rather it gives following error :
selenium.common.exceptions.StaleElementReferenceException: Message: The element reference of <select id="ctl00_ContentPlaceHolder1_ReportViewer1_ctl04_ctl05_ddValue" class="aspNetDisabled" name="ctl00$ContentPlaceHolder1$ReportViewer1$ctl04$ctl05$ddValue"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed
selenium.common.exceptions.StaleElementReferenceException: Message: The element reference of <select id="ctl00_ContentPlaceHolder1_ReportViewer1_ctl04_ctl05_ddValue" class="aspNetDisabled" name="ctl00$ContentPlaceHolder1$ReportViewer1$ctl04$ctl05$ddValue"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed