def setUp(self): self.user_id = 18888000071 self.password = 123456 self.admin = 199795 self.udid = get_ios_udid() sleep(3) stop_ios_appium() start_ios_appium(self.udid) # 连接ios设备 self.desired_caps = { 'platformName': 'iOS', 'deviceName': 'iPhone 6', 'device': 'iOS', 'bundleId': 'com.iscs.SmallAnimal', 'version': '9.3', 'udid': self.udid } self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', self.desired_caps) LoginPage(self.driver).login(self.user_id, self.password) print(self.driver.page_source) print(self.driver.current_context) # CardPage(self.driver).click_long_card() # 恢复数据(sql) pass
def setUp(self): username = 15399999999 # user=199310 password = 123456 # 测试数据恢复 release_storage_supply() self.udid = get_ios_udid() stop_ios_appium() start_ios_appium(self.udid) # 连接ios设备 self.desired_caps = { 'platformName': 'iOS', 'deviceName': 'iPhone SE', 'device': 'iOS', 'bundleId': 'com.iscs.SmallAnimal', 'version': '9.3', 'udid': self.udid } self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', self.desired_caps) sleep(3) # 登录 LoginPage(self.driver).login(username=username, password=password) main_page = MainPage(self.driver) # 登录后手机桌面空白卡片 main_page.click_empty_card() main_page.assert_release_warehouse() pass
def setUp(self): # 测试数据恢复 release_storage_supply() self.udid = get_ios_udid() stop_ios_appium() start_ios_appium(self.udid) # 连接ios设备 self.desired_caps = { 'platformName': 'iOS', 'deviceName': 'iPhone SE', 'device': 'iOS', 'bundleId': 'com.iscs.SmallAnimal', 'version': '9.3', 'udid': self.udid } self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', self.desired_caps) sleep(3) # 登录 LoginPage(self.driver).login(username=199164) # 登录后手机桌面空白卡片 self.driver.find_element_by_xpath( "//UIAApplication[1]/UIAWindow[1]/UIAScrollView[1]/UIAScrollView[1]/UIACollectionView[1]/UIACollectionCell[2]" ).click() sleep(2) assert is_element_present(self.driver, ('ACCESSIBILITY_ID', '发布仓储供应')) pass
def setUp(self): self.usr = 15511112222 self.pwd = 123456 # 删除数据 Restore_RegisterSupplier_SQL() self.udid = get_ios_udid() print(self.udid) sleep(3) stop_ios_appium() start_ios_appium(self.udid) # 连接ios设备 self.desired_caps = { 'platformName': 'iOS', 'deviceName': 'iPhone6 Plus', 'device': 'iOS', 'bundleId': 'com.iscs.SmallAnimal', 'version': '9.3', 'udid': self.udid } self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', self.desired_caps) sleep(3) LoginPage(self.driver).login(username=self.usr, password=self.pwd) # 登录 # 长期卡片 Common_Card_Page(self.driver).click_long_task() assert is_element_present(self.driver, ('ACCESSIBILITY_ID', '注册供应商')) pass
def setUp(self): # reduction_labor_contract() # 还原劳务契约 self.user_id = 10001474 mobile = 15624301115 password = 123456 BaseTestCase.setUp(self) LoginPage(self.driver).login(username=mobile, password=password) # 登录 pass
def setUp(self): delete_labor_contract() reduction_labor_contract() # 还原劳务契约 mobile = 17630301114 password = 123456 self.user_id = get_user_id(mobile) BaseTestCase.setUp(self) # eject_logged_user(mobile, password) sleep(12) # self.driver.find_element_by_accessibility_id('我知道了').click() LoginPage(self.driver).login(username=mobile, password=password) # 登录 # EatToast(self.driver, '您的账号在别的地方登录', '我知道了').eat_toast() # sleep(10) # self.driver.find_element_by_accessibility_id('我知道了').click() LoginPage(self.driver).login(username=mobile, password=password) LongCardPage(self.driver).click_expected_card(self.user_id, '找劳务需求') pass
def setUp(self): delete_transport_contract() reduction_transport_contract() # 还原运输供应契约 mobile = 15711041212 password = 123456 self.user_id = get_user_id(mobile) BaseTestCase.setUp(self) # eject_logged_user(mobile, password) LoginPage(self.driver).login(username=mobile, password=password) # 登录 pass
def setUp(self): BaseTestCase.setUp(self) self.user_id = 10001476 mobile = 15711041212 password = 123456 self.supply_id = 10001476 self.tr_participant_ukid = 10001476 delete_transport_contract(self.user_id, self.tr_participant_ukid) reduction_transport_contract() # 还原运输供应契约 LoginPage(self.driver).login(username=mobile, password=password) # 登录 pass
def setUp(self): self.udid = get_ios_udid() stop_ios_appium() start_ios_appium(self.udid) # 连接ios设备 self.desired_caps = {'platformName': 'iOS', 'deviceName': 'iPhone SE', 'device': 'iOS', \ 'bundleId': 'com.iscs.SmallAnimal', 'version': '9.3', 'udid': self.udid} self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', self.desired_caps) LoginPage(self.driver).login(username=17676769090, password=123456) pass
def setUp(self): self.user_id = 18888000070 self.password = 123456 self.admin = 10000959 self.udid = get_ios_udid() sleep(3) stop_ios_appium() start_ios_appium(self.udid) # 连接ios设备 self.desired_caps = {'platformName': 'iOS', 'deviceName': 'iPhone 6', 'device': 'iOS', 'bundleId': 'com.iscs.SmallAnimal', 'version': '9.3', 'udid': self.udid} self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', self.desired_caps) LoginPage(self.driver).login(self.user_id, self.password) # CardPage(self.driver).click_card_one() # 恢复数据(sql) # delete_business_framework(self.admin) pass
def setUp(self): self.admin = 10000214 self.udid = get_ios_udid() sleep(3) stop_ios_appium() start_ios_appium(self.udid) # 连接ios设备 self.desired_caps = { 'platformName': 'iOS', 'deviceName': 'iPhone 6 Plus', 'device': 'iOS', 'bundleId': 'com.iscs.SmallAnimal', 'version': '9.3', 'udid': self.udid } self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', self.desired_caps) sleep(3) LoginPage(self.driver).login(username=self.admin) # 登录 sleep(2) CardList(self.driver).click_long_task() # 点击4个长期任务 pass
def setUp(self): self.udid = get_ios_udid() stop_ios_appium() start_ios_appium(self.udid) # 连接ios设备 self.desired_caps = { 'platformName': 'iOS', 'deviceName': 'iPhone 6 Plus', 'device': 'iOS', 'bundleId': 'com.iscs.SmallAnimal', 'version': '9.3', 'udid': self.udid } self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', self.desired_caps) sleep(3) # 登录 LoginPage(self.driver).login(username=13311112222, password=123456) # 登录后手机桌面空白卡片 CardPage(self.driver).click_card_one() sleep(1) assert is_element_present(self.driver, ('ACCESSIBILITY_ID', '注册供应商')) pass
def test_Login2_001(self): LoginPage(self.driver).login(username=self.passwdus, password=123456) # 登录 CardPage(self.driver).click_card_one() # 卡片1 assert login_state(self.passwdus) == True
def test_Login2_007(self): LoginPage(self.driver).login(username=self.passwdus, password=1236555) # 登录 assert is_element_present(self.driver, ('ACCESSIBILITY_ID', '登录'))