Silk Mobile

Table of Contents (Homepage)

GetVisualDump

String GetVisualDump(String type)

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

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 there flection in the following three different types:-

    • non-instrumented.

    • Native (of native instrumented applications).

    • Web (of hybrid applications or web sites).

    Note: If 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:

images/download/attachments/3310307/26.jpg

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

The result of the command on the console is:

Non-instrumented dump is retrieved.

images/download/attachments/3310307/21.jpg

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:

images/download/attachments/3310307/22.jpg

Run the getVisualDump command with the type ’Native’.

The result of the command on the console is:

Native dump is retrieved.

images/download/attachments/3310307/23.jpg

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 an hybrid page, which contains the Native as well as Web object.

images/download/attachments/3310307/24.jpg

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)

images/download/attachments/3310307/25.jpg

Code Examples

Java Example
String str0 = client.getVisualDump("Native");
C# Example
string str0 = client.GetVisualDump("Native");
VBScript Example
str0 = client.GetVisualDump ( "Native" )
Report
Python Example
var0 = self.client.getVisualDump("Native")
Perl Example
my $str0 = $client->getVisualDump("Native");