#coding:utf-8 from appium import webdriver import time cap={ "platformName":"iOS", "platformVersion":"11.3", "deviceName":"iPad Air", "automationName":"XCUITest", "app":"/Users/bindo/Downloads/pos.app", "autoDismissAlerts":"true" } driver=webdriver.Remote("http://127.0.0.1:4723/wd/hub",cap) driver.switch_to.alert.accept()
#coding:utf8 from ios_load import driver import time time.sleep(1) driver.find_element_by_ios_predicate("name=‘Sign In‘").click() driver.implicitly_wait(10) driver.find_element_by_name("Email").send_keys("paul.wang@bindo.com") driver.find_element_by_name("Password").send_keys("w111111") driver.find_element_by_xpath("//XCUIElementTypeButton[@name=‘Sign In‘]").click() driver.implicitly_wait(8) store=driver.find_element_by_name("Select Store") driver.implicitly_wait(3) if(store): print("login in system succuss!") else: print("login in system fail!")