web自动化之locators

# 登录页面元素  login_locator.py

from selenium.webdriver.common.by import By


class LoginLocator:
phone_element = (By.XPATH, "//input[@name='phone']")
password_element = (By.XPATH, "//input[@name='password']")
submit_element = (By.XPATH, "//button[contains(@class,'btn-special')]")
success_info_element = (By.XPATH, "//img[@class='mr-5']/..")
error_msg_info_element = (By.XPATH, "//div[@class='form-error-info']")
error_flash_info_element = (By.XPATH, "//div[@class='layui-layer-content']")

猜你喜欢

转载自www.cnblogs.com/sophia-985935365/p/12640012.html