When I wait until the page loaded

This step definition acts as a command to wait until the page's body fully loads before performing any actions on the page

 

When (I|we)* wait until the page( is)* loaded

 

The page body loading time is set to 10 seconds. If the body isn't loaded within this time frame, an error will be triggered for this step definition. 

 

Example:

When I wait until the page is loaded
When we wait until the page loaded