AJAX stands for Asynchronous JavaScript And XML. AJAX uses combination of browser built-in XMLHttpRequest to request data from a web server and JavaScript/HTML DOM to display/use the data. Due to asynchronous nature of request and response of the calls, there may be delay in element being displayed in the page after an action has been performed on another element in the page.
To wait for the element to appear in the page, there are different waitfor commands in selenium IDE, which waits for default timeout set up for the element to appear. So in case an element is not displayed straightway, waitfor commands can be used to resolve sync issues in selenium IDE.
Some commonly used waitfor commands are:
Some commonly used waitfor commands are:
- waitForAlertNotPresent/waitForAlertPresent
- waitForElementPresent
- waitForTextPresent
- waitForPageToLoad
- waitForFrameToLoad
- clickandWait