Created
November 22, 2018 19:32
-
-
Save bbchriscesar/83cad5c8502389d3fb3baa66bb0873e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from appium import webdriver | |
from appium.webdriver.common.touch_action import TouchAction | |
import time | |
desired_capabilities = {} | |
desired_capabilities['language'] = 'ja' | |
desired_capabilities['automationName'] = 'XCUITest' | |
desired_capabilities['platformName'] = 'iOS' | |
desired_capabilities['version'] = '12.1' | |
desired_capabilities['platform'] = 'MAC' | |
desired_capabilities['deviceName'] = 'iPhone X' | |
desired_capabilities['bundleId'] = 'com.apple.Preferences' | |
desired_capabilities['shouldWaitForQuiescence'] = 'true' | |
desired_capabilities['shouldUseTestManagerForVisibilityDetection'] = 'false' | |
desired_capabilities['maxTypingFrequency'] = 60 | |
desired_capabilities['shouldUseSingletonTestManager'] = 'true' | |
desired_capabilities['orientation'] = 'PORTRAIT' | |
desired_capabilities['webStorageEnabled'] = 'false' | |
desired_capabilities['javascriptEnabled'] = 'true' | |
desired_capabilities['databaseEnabled'] = 'false' | |
desired_capabilities['takesScreenshot'] = 'true' | |
desired_capabilities['networkConnectionEnabled'] = 'false' | |
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_capabilities) | |
directory = '/Users/christiannec/Documents/iOS/' | |
driver.save_screenshot(directory + 'iOS001.png') | |
TouchAction(driver).tap(x=139, y=339).perform() | |
time.sleep(1) | |
driver.save_screenshot(directory + 'iOS002.png') | |
TouchAction(driver).tap(x=124, y=143).perform() | |
time.sleep(1) | |
driver.save_screenshot(directory + 'iOS003.png') | |
TouchAction(driver).tap(x=49, y=67).perform() | |
time.sleep(1) | |
driver.save_screenshot(directory + 'iOS004.png') | |
TouchAction(driver).tap(x=52, y=70).perform() | |
time.sleep(1) | |
driver.save_screenshot(directory + 'iOS005.png') | |
TouchAction(driver).tap(x=88, y=536).perform() | |
time.sleep(1) | |
driver.save_screenshot(directory + 'iOS006.png') | |
TouchAction(driver).tap(x=140, y=171).perform() | |
time.sleep(1) | |
driver.save_screenshot(directory + 'iOS007.png') | |
TouchAction(driver).tap(x=316, y=143).perform() | |
time.sleep(1) | |
TouchAction(driver).tap(x=351, y=152).perform() | |
time.sleep(1) | |
TouchAction(driver).tap(x=41, y=72).perform() | |
time.sleep(1) | |
driver.save_screenshot(directory + 'iOS008.png') | |
TouchAction(driver).tap(x=29, y=68).perform() | |
time.sleep(1) | |
TouchAction(driver).tap(x=75, y=584).perform() | |
time.sleep(1) | |
TouchAction(driver).tap(x=44, y=72).perform() | |
time.sleep(1) | |
driver.save_screenshot(directory + 'iOS009.png') | |
TouchAction(driver).tap(x=122, y=757).perform() | |
time.sleep(1) | |
TouchAction(driver).tap(x=191, y=465).perform() | |
time.sleep(1) | |
TouchAction(driver).tap(x=51, y=70).perform() | |
time.sleep(1) | |
driver.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment