from selenium.webdriver.common.by import By
from base.mp_base.base_page import BasePage, BaseHandle


# mp自媒体登录页面类
class LoginPage(BasePage, BaseHandle):

    def __init__(self):  # 每个类属性 都是一个对象
        super().__init__()
        # 账号输入框
        self.username = self.find_elt((By.CSS_SELECTOR, "[placeholder*='手机号']"))
        # 验证码
        self.code = self.find_elt((By.CSS_SELECTOR, "[placeholder*='验证码']"))
        # 登录按钮
        self.login_btn = self.find_elt((By.CSS_SELECTOR, ".el-button--primary"))

    # 登录的方法
    def test_login(self, username, code):
        self.input_text(self.username, username)
        self.input_text(self.code, code)
        self.login_btn.click()

4f7de4989fffde7ac12f078745ccd16f7496dd8f
<mask token>


class LoginPage(BasePage, BaseHandle):
    <mask token>
    <mask token>

<mask token>


class LoginPage(BasePage, BaseHandle):
    <mask token>

    def test_login(self, username, code):
        self.input_text(self.username, username)
        self.input_text(self.code, code)
        self.login_btn.click()

<mask token>


class LoginPage(BasePage, BaseHandle):

    def __init__(self):
        super().__init__()
        self.username = self.find_elt((By.CSS_SELECTOR, "[placeholder*='手机号']")
            )
        self.code = self.find_elt((By.CSS_SELECTOR, "[placeholder*='验证码']"))
        self.login_btn = self.find_elt((By.CSS_SELECTOR, '.el-button--primary')
            )

    def test_login(self, username, code):
        self.input_text(self.username, username)
        self.input_text(self.code, code)
        self.login_btn.click()

from selenium.webdriver.common.by import By
from base.mp_base.base_page import BasePage, BaseHandle


class LoginPage(BasePage, BaseHandle):

    def __init__(self):
        super().__init__()
        self.username = self.find_elt((By.CSS_SELECTOR, "[placeholder*='手机号']")
            )
        self.code = self.find_elt((By.CSS_SELECTOR, "[placeholder*='验证码']"))
        self.login_btn = self.find_elt((By.CSS_SELECTOR, '.el-button--primary')
            )

    def test_login(self, username, code):
        self.input_text(self.username, username)
        self.input_text(self.code, code)
        self.login_btn.click()

from selenium.webdriver.common.by import By
from base.mp_base.base_page import BasePage, BaseHandle


# mp自媒体登录页面类
class LoginPage(BasePage, BaseHandle):

    def __init__(self):  # 每个类属性 都是一个对象
        super().__init__()
        # 账号输入框
        self.username = self.find_elt((By.CSS_SELECTOR, "[placeholder*='手机号']"))
        # 验证码
        self.code = self.find_elt((By.CSS_SELECTOR, "[placeholder*='验证码']"))
        # 登录按钮
        self.login_btn = self.find_elt((By.CSS_SELECTOR, ".el-button--primary"))

    # 登录的方法
    def test_login(self, username, code):
        self.input_text(self.username, username)
        self.input_text(self.code, code)
        self.login_btn.click()
