Created
November 23, 2018 21:35
-
-
Save bbchriscesar/dbfcf2f845ec1c1045f96e8cbe5aa9a5 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 | |
import os.path | |
locale = 'de' | |
directory = '/Users/christiannec/Documents/iOS/' + locale | |
if not os.path.exists(directory): | |
os.makedirs(directory) | |
desired_caps = {} | |
desired_caps['platformName'] = 'iOS' | |
desired_caps['platformVersion'] = '12.1' | |
desired_caps['automationName'] = 'XCUITest' | |
desired_caps['deviceName'] = 'iPhone Simulator' | |
desired_caps['bundleId'] = 'com.apple.mobilesafari' | |
self.driver = webdriver.Remote('http://localhost:3128/', desired_caps) | |
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment