Legacy | Webpage.Info
-
Command: webpage
-
Subcommand: info
-
Supported Platforms: Native (legacy), UFT (legacy), Selenium, Appium
All commands must be executed using the same framework. Sharing the execution ID between different frameworks is not possible. This means that if you work with a Selenium/Appium driver, you need to call the commands using the Selenium/Appium driver (or, in the case of Reporting commands, through the Reporting SDK that works with the driver) and not as part of a UFT test or another framework.
-
Supported OS: Android, iOS
Description
Retrieves the specified webpage property and can insert the value into a defined variable. Use the property parameter to specify the webpage property to retrieve. Only one property value or performance value can be specified in each command.
The returnValue field of the response provides the value of the requested property value.
Parameters
Name | Values | Default | Description |
---|---|---|---|
deviceId* |
|
|
The device for this command. |
property* | docUrl (URL) docTitle (Title) userAgent (User Agent) innerHTML (Source) outerHTML (Outer HTML) performance (Performance) |
|
The webpage property to be retrieved. Used alongside the Performance parameter. URL(docUrl) Title(docTitle) User Agent(userAgent) Source(source) performance Reference: www.w3.org |
performance | pageLoadTime (Page Load Time) navigationStart (Navigation Start) unloadEventStart (Unload Event Start) unloadEventEnd (Unload Event End) redirectStart (Redirect Start) redirectEnd (Redirect End) fetchStart (Fetch Start) domainLookupStart (Domain Lookup Start) domainLookupEnd (Domain Lookup End) connectStart (Connect Start) connectEnd (Connect End) secureConnectionStart (Secure Connection Start) requestStart (Request Start) responseStart (Response Start) responseEnd (Response End) domLoading (Dom Loading) domInteractive (Dom Interactive) domContentLoadedEventStart (Dom Content Loaded Event Start) domContentLoadedEventEnd (Dom Content Loaded Event End) domComplete (Dom Complete) loadEventStart (Load Event Start) loadEventEnd (Load Event End) |
Page Load Time | The required performance parameter. Used alongside thePerformanceproperty. Navigation Start Unload Event Start Unload Event End Redirect Start Redirect End Fetch Start Domain Lookup Start Domain Lookup End Connect Start Connect End Secure Connection Start Request Start Response Start Response End Dom Loading Dom Interactive Dom Content Loaded Event Start Dom Content Loaded Event End Dom Complete Load Event Start Load Event End Reference: www.w3.org This parameter is supported only for Android devices (v 4.1 OS and later) |
timeout |
|
30 | The time, in seconds, to wait for the page to be loaded in order to retrieve the webpage property. |
scope |
|
|
A list of XPath expressions representing an iFrame/Frame. |
variable |
|
|
The variable to receive the webpage property value. |
webView |
|
1 | The index number of the web view in a hybrid application. |
framework | appium-1.3.4 (Appium) perfectoMobile (PerfectoMobile) |
PerfectoMobile | The automation framework. PerfectoMobile (default) Appium |
report | all (All) all-on-error (All on error) screenshot (Screenshot) screenshot-on-error (Screenshot on error) text (Text) none (None) |
Screenshot | The value to display in the report. Screenshot- display screenshot Screenshot on error- display screenshots only for actions in error Text- display screen text All- display screenshot and text All on error- display text always and screenshot only for actions in error None- display nothing It is recommended to reduce the resolution in very long scripts that result in large report files. |
report.resolution | high (High) medium (Medium) low (Low) |
High | The image resolution. High Medium Low It is recommended to reduce the resolution in very long scripts that result in large report files. |
* Mandatory
Request & Response
Request
https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-12-07_08_30_54_151?operation=command&securityToken=<your_token>&command=webpage&subcommand=info¶m.deviceId=2ACB96B8¶m.property=docUrl¶m.property=docTitle
JSON response
{
"reason":"Success",
"timer.elapsed":"1750",
"returnValue":"http://www.cnn.com/",
"testGridReportUrl":"https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-12-07_08_30_54_151",
"description":"Success",
"timer.system":"547",
"completed":"true",
"flowEndCode":"SUCCEEDED",
"executionId":"john@perfectomobile.com_controller_16-12-07_08_30_54_151",
"timer.ux":"1203",
"singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161207/controller_16-12-07_08_30_54_151.xml&ownerId=john@perfectomobile.com&sharingCode=a8d8ba68-ee11-4594-a83a-2eca62034d2c",
"reportKey":"PRIVATE:controller/161207/controller_16-12-07_08_30_54_151.xml",
"scopes":"0",
"timer.device":"1203"}