Robotframework Automated test framework-Mobile phone Automation test Click A Point keyword Usage

Source: Internet
Author: User

The Click a point keyword is used to simulate clicking a dot on the app interface, which receives two three parameters [x=0 | y=0 | duration=100],x and y represent the coordinate position of the point, and duration represents the duration of the click. If these three parameters are not passed in, the default x=0,y=0,duration=100 will be divided into tables.

Example 1: This is still done using the app interface above, using the click a point keyword to simulate clicking on a button and entering the coordinates of the button.

Open application Http://localhost:4723/wd/hub platformname=android platformversion=22 DEVICENAME=98YFBP522VSU app=c:/users/yongqing/desktop/app-debug.apk Apppackage=com.example.calculator appActivity=MainActivity

Input Text accessibility_id= Entry box 23

Input Text Id=com.example.calculator:id/factortwo 12

Click A Point 370 339 1000

Execution Result:

Starting test:RobotFrameworkTest1.TestSuite5.TestCase008

20170510 15:32:25.243:info:typing text ' into text field ' accessibility_id= input box '

20170510 15:32:25.243:info:msg:find accessibility_id= Input Box

20170510 15:32:32.005:info:typing text ' into text field ' Id=com.example.calculator:id/factortwo '

20170510 15:32:32.006:info:msg:find Id=com.example.calculator:id/factortwo

20170510 15:32:37.282:info:clicking on a point (370,339).

Ending test:RobotFrameworkTest1.TestSuite5.TestCase008

As you can see from the execution results, you can also click a button by clicking on the click a point keyword.

Robotframework Automated test framework-Mobile phone Automation test Click A Point keyword Usage

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.