In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
When the students do the app automatic test, they often use to find elements, locate elements, send data, long press, and click.
Hit, slide up, slide down, slide left, slide right and so on. Next, let's talk about how to use the swipe method that comes with appium to realize up-sliding,
Slide, left slide, right slide.
Pre-condition: appium is enabled; and the phone is linked.
Locate the element through the UIautomator that comes with SDK.
Python can be linked to the mobile phone through the appium module.
Open uiautomator to familiarize yourself with the concept of X and Y coordinates
Each element has start and end coordinates. (that is, the position of this element on the screen)
The last element in the display area on the right has a start coordinate of [772.1872] and an end coordinate of [817jue 1905].
So we're going to slide the screen, that is, click on one coordinate, and then slide to another coordinate, and do this.
After that, the screen will slide accordingly.
2. Use the swipe method
Slide up:
Get the screen size first. Each phone has a different size, so use the get_window_size function to get the size.
The up-slide operation is to click on a coordinate from the bottom of the screen and then slide up, and the x coordinate can remain the same. The start and end coordinates of Y can be improved.
Decline:
To slide is to click on one coordinate from the top of the screen and then slide down to another coordinate, and the x coordinate can remain the same. The start and end coordinates of Y can be changed.
Slide left:
To slide to the left is to click a coordinate point from the right end of the screen to slide to the left to another coordinate point. The Y coordinates can not be changed. The start and end coordinates of X can be changed.
Slide to the right:
To slide right is to click on a coordinate point from the left end of the screen and then slide back to another coordinate point. the Y coordinates can remain the same. The start and end coordinates of X can be changed.
If you have any questions, you can add × × stream QQ group: 610845268
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.