Appium Connect night God Simulator, analog gesture tap (TAP)

Source: Internet
Author: User
Tags appium

1 #-*-coding:utf-8-*-2  fromAppiumImportWebdriver3  fromTimeImportSleep4Desired_caps ={5 'PlatformName':'Android',6 'devicename':'127.0.0.1:62001',7 'platformversion':'4.4.2',8 'Apppackage':'com.baidu.yuedu',9 'appactivity':'com.baidu.yuedu.splash.SplashActivity',Ten 'Unicodekeyboard': True,#bypassing the phone keyboard operation, Unicodekeyboard is sending a string using Unicode encoding One 'Resetkeyboard': True#bypassing the phone keyboard operation, Resetkeyboard is to hide the keyboard. A #' apppackage ': ' Com.android.browser ', - #' appactivity ': ' Com.android.browser.BrowserActivity ' - #' apppackage ': ' Com.hsd.huosuda_user ', the #' appactivity ': ' Com.hsd.huosuda_user.guide.WelcomeActivity ' - } -Driver = Webdriver. Remote ('Http://127.0.0.1:4723/wd/hub', Desired_caps) -Sleep (10) +Driver.tap ([(556,656), (631,704)],500)#Analog Gestures Click -Sleep (10) +Driver.tap ([(141,791), (348,851)],500)#Analog Gestures Click ASleep (5) atDriver.tap ([(637,65), (691,94)],500)#Analog Gestures Click

The script is as follows:

First step: Start Uiautomatorviewer.bat

The second step: Start the night God Simulator, open the Baidu reading software: After the night God Simulator, click Settings--About the tablet, click on the 5 version number to enter the developer mode, through the ADB command to view the device connection, the connection is ready to operate, reference:/http Www.cnblogs.com/lelexiong/p/8763358.html

The third step: Click to make the emulator current page refresh location

Gesture positioning click through bounds;

Open the Appium server and run the script;

Appium Connect night God Simulator, analog gesture tap (TAP)

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.