2
同じ行に「目」がありますが、別のIDを見つけることができないため、「パスワード」スペースを長くクリックする方法が必要です。しかし私が書いたプログラムは長いクリックをしていない。私のコードを修正してください:Pythonの長いクリック
def testDevice1(self):
time.sleep(5)
username=self.driver.find_element_by_id('com.eas.android:id/front_edit')
username.send_keys('[email protected]')
time.sleep(5)
password = self.driver.find_element_by_id('com.eas.android:id/password')
password.send_keys('111111')
time.sleep(5)
self.driver.longClick('com.eas.android:id/password')
time.sleep(10)
self.driver.save_screenshot('/home/nat/PycharmProjects/touchoneautomation/appiumTests/screenshots/shot1.png')
self.driver.find_element_by_id('com.eas.android:id/btn_login').click()
self.driver.save_screenshot('/home/nat/PycharmProjects/touchoneautomation/appiumTests/screenshots/shot1.1.png')
time.sleep(5)
self.driver.save_screenshot('/home/nat/PycharmProjects/touchoneautomation/appiumTests/screenshots/shot1.2.png')
self.driver.find_element_by_id("com.eas.android:id/panel_logout").click()
time.sleep(5)