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)