<input type="button" value="Submit" id="SubET" onclick="TabScript.saveSelections();" />...Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(function() {$(' SubET ').disabled = true;});Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function() {$(' SubET ').disabled = false;
Expected Conditions
There are some common conditions that are frequently come across when automating web browsers. Listed below are Implementations of each. Java happens to have convienence methods so you don’t have to code an ExpectedCondition class yourself or create your own utility package for them.
- Element is Clickable - it is Displayed and Enabled.
wait = WebDriverWait(driver, 10) def clickable(element): if element.is_clickable(): return element return null element = wait.until(lambda d: clickable(d.find_element_by_id('someid')))The ExpectedConditions class in contains a set of predefined conditions to use with WebDriverWait in Java.