2
Мне нужен метод, который позволяет долго нажимать на «пароль», так как он имеет «глаз» в той же строке, но не может найти отдельный идентификатор. но программа, которую я написал, не делает длинный клик. Исправьте мой код:Длинный клик в 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)