Wait for condition issue
we r trying to automate web application using selenium 2, one issue which v have to regularly deal with is wait time for elements to appear.
In this application some control/functionlity are handled through lightbox/popup, even after using wait for given element to appear, script doesn't wait rather throws visiblity exception for the element used after wait command (may be due to lightbox starts loading & its dom get partially loaded in Firefox) & v cannot use Thread.sleep in our code as recommended by upper management...
I want to create a generic method which waits till element get visible/displayed...such as waitForElementToVisible..etc
it would be great help, if any input is provided.
Re: Wait for condition issue
You can create your own function for synchronization point for element present on the page for this just create a function with 2 parameters and use Thread.sleep() method , until you want to check whether element is present or not and the function parameter is your selenium/webdriver object and element/object name.