Skip to main content

SeeTest Client - GetVisualDump

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 .

String GetVisualDump(String type)

Description

This command will return a String which contains the XML with all the dump (object spy) properties of the screen.

Parameters

  • String type: User can get the dump on the reflection in the following types:

    • Non-instrumented.
    • Native (of native instrumented applications).
    • Web (of hybrid applications or web sites).
    • Web: [custom root for dump]
    info

    Note: If the type of dump is not supported on the current page - empty xml will be retrieved.

Usage

This command will get the structure of a page displayed on the device to analyze later by parsing the xml.

Non-instrumented 

On the following example we will show the use of the command to pull the non-instrumented dump of the springboard of the device.

Device should be iOS7 and higher and non-instrumented mode should be enabled.

Reflection of the device:

Run the getVisualDump command with the type 'Non-instrumented'.

The result of the command on the console is:

Non-instrumented dump is retrieved.

Native 

On the following example we will show the use of the command to pull the dump of native instrumented application. In this case we will use the demo application of Eribank.

We will launch the application on the device:

Run the getVisualDump command with the type ’Native’.

The result of the command on the console is:

Native dump is retrieved.

Web 

On the following example we will show the use of the command to pull the web dump of hybrid instrumented application.

In this case we will use the demo application of Eribank which has hybrid parts in it.

We will launch the app and navigate to a hybrid page, which contains the Native as well as Web object.

Run the getVisualDump command with type 'Web'.

The result of the command on the console is:

Web dump is retrieved (Note that native is not retrieved)

Web - partial dump with custom root 

On web pages with big and complex UI hierarchy tree, sometimes the web dump for the whole page is unnecessary. If different sub-trees can be identified, this command supports getting only a part of the web dump.

Usage:

note
web:<identification method>=<value>

Code example:

Java Example

String partial_web_dump = client.getVisualDump("web:id=some_element_id");

Where "identification method" is one of the following:

  1. id

  2. class

  3. name

info

While 'id' is expected to be unique (by HTML/JavaScript), 'class' and 'name' can appear on multiple elements. In case there are multiple matching elements, the first matching element will be used.

Code Examples

Java Example

String str0 = client.getVisualDump("Native");

C# Example Expand source

string str0 = client.GetVisualDump("Native");

VBScript Example Expand source

str0 = client.GetVisualDump ("Native")
Report

Python Example Expand source

var0 = self.client.getVisualDump("Native")

Perl Example Expand source

my $str0 = $client->getVisualDump("Native");