All Downloads are FREE. Search and download functionalities are using the official Maven repository.

desc.WaitForJavaScriptCondition.txt Maven / Gradle / Ivy

There is a newer version: 1.9
Show newest version
Waits for the given JavaScript condition.

Fails if timeout expires before the condition is met.

*Example:*

| *** Variables *** |
| ${js_condition}          | return (xmlhttp.readyState >= 2 && xmlhttp.status == 200) |
| ${js_timeout_in_seconds} | 5 |

| *** Test Cases *** |
| Ajax Test          |
|  [Tags]            | ajax-test |
|  `Navigate To`       | http://www.w3schools.com/ajax/default.asp |
|  `Click Element`     | css=button[type="button"] |
|  ${jsCondition}=     | `Wait For JavaScript Condition` | ${js_condition} | ${js_timeout_in_seconds} |
|  `Element Text Should Be` | css=#myDiv > p | AJAX is not a new programming language. |

=>

| ${jsCondition} = True




© 2015 - 2024 Weber Informatics LLC | Privacy Policy