Using Mobility keywords - Opkey New UI

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

How to use Keywords?

To use keywords, you insert them into a test step along with input and expected output data. If dealing with dynamic objects, you can also include object properties 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 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 Add Step button at the top panel. 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 a 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 the  Execution Result. 

Blank 

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



Here Input and Object argument is not required.


These values are filled as per the requirement of the keyword used in the test case as shown in the image below. 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 atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article