1.

How To Wait For Element To Be Available In Angular Applications?

Answer»

The application may load some elements LATE and your script needs to STOP for the element to be available for next action.

In below PROTRACTOR code, the script is going to wait maximum 30 seconds for the element to be available. FEEL FREE to change the maximum number per your application needs.

browser.wait (ExpectedConditions.presenceOf (element (by.id ("element-id"))), 30000)

The application may load some elements late and your script needs to stop for the element to be available for next action.

In below protractor code, the script is going to wait maximum 30 seconds for the element to be available. Feel free to change the maximum number per your application needs.

browser.wait (ExpectedConditions.presenceOf (element (by.id ("element-id"))), 30000)



Discussion

No Comment Found