Skip to main content

SeeTest Client - HybridWaitForPageLoad

info

Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .

**hybridWaitForPageLoad (**time)

Description

Waits for a web page to load in a given time-out in milliseconds.

info

Note: In hybrid applications - will wait for the web part of the application to load.

Parameters

  • Time: The time to sleep in milliseconds

Usage

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.

info

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.

Code Examples

Java Example

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....

C# Example Expand source

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....

VBScript Example Expand source

client.SetDevice "adb:Nexus5"
Report
client.Launch "chrome:http://www.amazon.com", true, false
Report
client.HybridWaitForPageLoad 10000
Report

Python Example Expand source

self.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....

Perl Example Expand source

$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....