Using Mobility Keywords - Opkey Classic

Opkey Mobility keywords are commands to facilitate the automation of mobile testing scenarios. 

How to use Keywords?

Keywords are used by calling them in a test step and adding the input and expected output data values. If you want to capture the dynamic objects, you can also add properties of the object in the test object column. Let's understand this with an example of using the Mobile_GetVisibleTextsOnScreen keyword.



Mobile_GetVisibleTextsOnScreen


This keyword gives all visible Texts of an application visible on the Mobile screen.


This keyword is mostly used in a situation where a user wants to know all visible Text visible on the Mobile Screen. On executing this keyword all visible Texts of the application displayed on the mobile screen are displayed as Output.

For example, to get all the visible texts of a mobile screen, we can use the following steps:-


1. Add a new step in your test case by clicking the + icon at the top. Search Mobile_GetVisibleTextsOnScreen and click on the search result to add it to the new test step.



2. The Next step is to add input data but here for this keyword test object and input data are not required. Suppose you want to get all visible Texts of an application Present on the Mobile Screen.


Use Mobile_LaunchAndroidApplication  and Give the Device name and application Name Respectively in the Data Input Argument.


Use Keyword  Mobile_GetVisibleTextsOnScreen

 

Output

 

Learn more about Astro on the Go || Log in || Login with || Sign up || Skip

All Visible Text of the Application present on the Mobile Screen is displayed as Output on Execution Result. 

Blank 

If there is no text visible of the application on mobile screen.



These values are filled as per the requirement of the keyword used in the test case . We have given similar tables for each keyword for illustration. 


In this Keyword, there was no requirement to add a Test Object's properties and input data, hence, we have mentioned it is not required.


Test Object 


Test Object Required?

Description

No

This keyword does not require any Object input argument.


Input Data

 Input Data Required?

 Description 

No

This keyword does not require any Input data argument.

.


Output Data

Condition

Output value

If the keyword passes successfully

True

if there is an error

False



Common Error conditions


Scenarios

Error Message

Debug Information

No text present


No Text found




Please go through the list of keywords by clicking the below link.


List of Keywords - Mobility Keywords

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article