Skip to main content

SeeTestAutomation - GetCurrentActivity

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 .

GetCurrentActivity()

info

This is supported in Android only.

Description​

This command will retrieve the foreground activity name.

Parameters​

No parameters

info

Note: This command will throw an exception for devices which do not support the command.

Usage​

We will use the this command to confirm that the eribank login activity is in the foreground.

Code Examples​

Java Example

 String str0 = client.getCurrentActivity();

C# Example Expand source

 string str0 = client.GetCurrentActivity();

VBScript Example Expand source

 Dim str0 As String = client.GetCurrentActivity()

Python Example Expand source

 var0 = self.client.getCurrentActivity()

Perl Example Expand source

 my $str0 = $client->getCurrentActivity();