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