コード例 #1
0
 def riqiwan(self, wan, id):
     element = UiUtil.find_elment(
         'save',
         'wan',
     )
     # js = "$('input[id=laststoretime]').attr('readonly','')"
     UiUtil.alter_seletor_input(element, wan, id)
コード例 #2
0
 def __init__(self):
     driver = UiUtil.get_driver()
     Login(driver).do_login({
         "username": "******",
         "password": "******",
         "verifycode": "0000"
     })
コード例 #3
0
 def __init__(self):
     self.driver = UiUtil.get_driver()
コード例 #4
0
 def input_name(self, name):
     ele = self.driver.find_element_by_id("customername")
     UiUtil.input(ele, name)
コード例 #5
0
 def click_login(self):
     login_button = self.driver.find_element_by_css_selector(
         "button.form-control")
     UiUtil.click(login_button)
コード例 #6
0
 def input_password(self, password):
     ps = self.driver.find_element_by_id("password")
     UiUtil.input(ps, password)
コード例 #7
0
 def click_login_button(self):
     login_button_element = UiUtil.find_elment('login', 'login_button')
     UiUtil.click(login_button_element)
コード例 #8
0
 def input_password(self, password):
     upass_element = UiUtil.find_elment('login', 'upass')
     UiUtil.input(upass_element, password)
コード例 #9
0
 def input_barcode(self, name):
     element = UiUtil.find_elment('save', 'bar')
     UiUtil.input(element, name)
     pass
コード例 #10
0
 def input_name(self, name):
     element = UiUtil.find_elment('save', 'name')
     UiUtil.input(element, name)
     pass
コード例 #11
0
 def input_hao(self, hao):
     element = UiUtil.find_elment('save', 'hao')
     UiUtil.input(element, hao)
コード例 #12
0
 def click_vip(self):
     ele = self.driver.find_element_by_link_text("会员管理")
     UiUtil.click(ele)
コード例 #13
0
 def vip_query(self):
     ele = self.driver.find_element_by_xpath(
         "/html/body/div[4]/div[1]/form[2]/div[2]/button[1]")
     UiUtil.click(ele)
コード例 #14
0
 def riqi(self, ripi):
     ele = self.driver.find_element_by_id("childdate")
     UiUtil.alter_seletor_input(ele, ripi)
コード例 #15
0
 def input_sex(self):
     ele = self.driver.find_element_by_id("childsex")
     UiUtil.select_or(ele)
コード例 #16
0
    def input_account(self, username):

        uname_element = UiUtil.find_elment('login', 'uname')
        UiUtil.input(uname_element, username)

    def input_password(self, password):
        upass_element = UiUtil.find_elment('login', 'upass')
        UiUtil.input(upass_element, password)

    def input_verifycode(self, verifycode):
        vfcode_element = UiUtil.find_elment('login', 'vfcode')
        UiUtil.input(vfcode_element, verifycode)

    def click_login_button(self):
        login_button_element = UiUtil.find_elment('login', 'login_button')
        UiUtil.click(login_button_element)

    def do_login(self, login_data):
        self.input_account(login_data['username'])
        self.input_password(login_data['password'])
        self.input_verifycode(login_data['verifycode'])
        self.click_login_button()


if __name__ == '__main__':
    driver = UiUtil.get_driver()
    data=FileUtil.get_excel("../conf/woniu.json", 0)
    print(data[0])
    Login(driver).do_login(data[0])
コード例 #17
0
    def input_account(self, username):

        uname_element = UiUtil.find_elment('login', 'uname')
        UiUtil.input(uname_element, username)
コード例 #18
0
 def click_save(self):
     element = UiUtil.find_elment('save', 'text')
     UiUtil.click(element)
     pass
コード例 #19
0
 def input_verifycode(self, verifycode):
     vfcode_element = UiUtil.find_elment('login', 'vfcode')
     UiUtil.input(vfcode_element, verifycode)
コード例 #20
0
 def riqiz(self, zao, id):
     element = UiUtil.find_elment('save', 'zao')
     # js = "$('input[id=earlystoretime]').attr('readonly','')"
     UiUtil.alter_seletor_input(element, zao, id)
コード例 #21
0
 def input_username(self, username):
     name = self.driver.find_element_by_id("username")
     UiUtil.input(name, username)
コード例 #22
0
 def type(self, t):
     element = UiUtil.find_elment('save', 'type')
     UiUtil.select_text(element, t)
コード例 #23
0
 def input_verifycode(self, verifycode):
     vf = self.driver.find_element_by_id("verifycode")
     UiUtil.input(vf, verifycode)
コード例 #24
0
 def click_type(self):
     element = UiUtil.find_elment('save', 'type_click')
     UiUtil.click(element)
コード例 #25
0
 def logout(self):
     ele = self.driver.find_element_by_xpath('//*[text()="注销"]')
     UiUtil.click(ele)
コード例 #26
0
 def input_phone(self, phone):
     ele = self.driver.find_element_by_id("customerphone")
     UiUtil.input(ele, phone)