hybridWaitForPageLoad (time)
|
|
|
|
Waits for a web page to load in a given time-out in milliseconds
Note: In hybrid applications - will wait for the web part of the application to load.
Time: The time to sleep in milliseconds
Scenario: In the following example we will use the 'HybridWaitForPageLoad' to wait for the following web page – http://www.amazon.com to load.
Command usage: ‘HybridWaitForPageLoad‘ will wait and not proceed to the next step until the web page load is finished, It is recommended to use this command when loading new web pages.
Parameters:
Timeout: The time we will wait for the page to load in milliseconds – will be set to the default value – 10000.
Step 1: Launch http://www.amazon.com.
Note: The web page is not fully loaded after the command ends.
Step 2: Before moving to the next step, we will use the ' HybridWaitForPageLoad ' command to make sure that the page is fully loaded.
client.setDevice("adb:Nexus5");client.launch("chrome:http://www.amazon.com", true, false);client.hybridWaitForPageLoad(10000);// Now we can move to next steps on the web page....client.SetDevice("adb:Nexus5");client.Launch("chrome:http://www.amazon.com", true, false);client.HybridWaitForPageLoad(10000);// Now we can move to next steps on the web page....client.SetDevice "adb:Nexus5"Reportclient.Launch "chrome:http://www.amazon.com", true, falseReportclient.HybridWaitForPageLoad 10000Reportself.client.setDevice("adb:Nexus5")self.client.launch("chrome:http://www.amazon.com", True, False)self.client.hybridWaitForPageLoad(10000)# Now we can move to next steps on the web page....$client->setDevice("adb:Nexus5");$client->launch("chrome:http://www.amazon.com", 1, 0);$client->hybridWaitForPageLoad(10000);# Now we can move to next steps on the web page....