#encoding:utf-8
from find_element.capability import driver
from selenium.webdriver.support.ui import WebDriverWait
#启动APP
#验证进入登录页面
WebDriverWait(driver,2).until(lambda x:x.find_element_by_xpath("//*[@text='密码登录']"))
#清空手机号
driver.find_element_by_id("com.systoon.iningde:id/et_phone_num").clear()
#输入手机号
driver.find_element_by_id("com.systoon.iningde:id/et_phone_num").send_keys("15313226821")
# password = driver.find_element_by_xpath("//*[text='请输入密码']")
#输入密码
driver.find_element_by_xpath("//*[@text='请输入密码']").send_keys("syswin1234")
driver.save_screenshot('login.png')
driver.get_screenshot_as_file('./images/login.png')
#点击登录按钮
driver.find_element_by_xpath("//*[@text='登录']").click()
网友评论