Example #1
0
 def input_earlytime(self, earlystoretime):
     eartime = UiUtil.find_element('store_query', 'earlytime')
     UiUtil.alter_seletor_input_earlystoretime(eartime, earlystoretime)
Example #2
0
 def input_barcode(self, barcode):
     code = UiUtil.find_element('store_query', 'barcode')
     UiUtil.input(code, barcode)
Example #3
0
 def input_goodstype(self, goodstype):
     type = UiUtil.find_element('store_query', 'goodstype')
     UiUtil.select_by_text(type, goodstype)
Example #4
0
 def click_login_button(self):
     login_button = UiUtil.find_element('login', 'login_button')
     UiUtil.click(login_button)
Example #5
0
 def input_cusname(self, cusname):
     cname = self.driver.find_element_by_id('customername')
     UiUtil.input(cname, cusname)
Example #6
0
    def input_verifycode(self, verifycode):
        vfcode = UiUtil.find_element('login', 'vfcode')
        UiUtil.input(vfcode, verifycode)

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

    def click_loginout_button(self):
        logout = UiUtil.find_element('login', 'logout_uname')
        UiUtil.click(logout)
        logout_button = UiUtil.find_element('login', 'logout_button')
        UiUtil.click(logout_button)

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

    def do_loginout(self, login_data):
        self.do_login(login_data)
        time.sleep(5)
        self.click_loginout_button()


if __name__ == '__main__':
    driver = UiUtil.get_driver()
    login_data = {'username': '******', 'password': '******', 'verifycode': '0000'}
    Login(driver).do_loginout(login_data)
Example #7
0
 def input_password(self, password):
     pws = UiUtil.find_element('login', 'upass')
     UiUtil.input(pws, password)
Example #8
0
 def click_query_button(self):
     query_button = self.driver.find_element_by_css_selector(
         'button.form-control:nth-child(3)')
     UiUtil.click(query_button)
Example #9
0
 def click_alter_button(self):
     alter_button = self.driver.find_element_by_id('editBtn')
     UiUtil.click(alter_button)
Example #10
0
 def input_creditcloth(self, creditcloth):
     credcloth = self.driver.find_element_by_id('creditcloth')
     UiUtil.input(credcloth, creditcloth)
Example #11
0
 def click_add_button(self):
     add_button = self.driver.find_element_by_css_selector(
         'button.form-control:nth-child(1)')
     UiUtil.click(add_button)
Example #12
0
 def input_creditkids(self, creditkids):
     credit = self.driver.find_element_by_id('creditkids')
     UiUtil.input(credit, creditkids)
Example #13
0
 def input_data(self, childdate):
     data = self.driver.find_element_by_id('childdate')
     UiUtil.alter_seletor_input(data, 'id=childdate', childdate)
Example #14
0
 def input_sex(self, childsex):
     sex = self.driver.find_element_by_id('childsex')
     UiUtil.select_by_text(sex, childsex)
Example #15
0
 def input_endtime(self, laststoretime):
     lasttime = UiUtil.find_element('store_query', 'lasttime')
     UiUtil.alter_seletor_input_laststoretime(lasttime, laststoretime)
Example #16
0
 def click_condition_button(self):
     button = UiUtil.find_element('store_query', 'condition_query')
     UiUtil.click(button)
Example #17
0
 def click_query_button(self):
     button = UiUtil.find_element('store_query', 'query_button')
     UiUtil.click(button)
Example #18
0
 def click_zeroStored_button(self):
     button = UiUtil.find_element('store_query', 'zeroStored_query')
     UiUtil.click(button)
Example #19
0
 def input_username(self, username):
     uname = UiUtil.find_element('login', 'uname')
     UiUtil.input(uname, username)
Example #20
0
 def input_goodsSize(self, goodsserial):
     gsize = UiUtil.find_element('store_query', 'gserial')
     UiUtil.input(gsize, goodsserial)
Example #21
0
 def input_verifycode(self, verifycode):
     vfcode = UiUtil.find_element('login', 'vfcode')
     UiUtil.input(vfcode, verifycode)
Example #22
0
 def input_goodsname(self, goodsname):
     gname = UiUtil.find_element('store_query', 'gname')
     UiUtil.input(gname, goodsname)
Example #23
0
 def click_loginout_button(self):
     logout = UiUtil.find_element('login', 'logout_uname')
     UiUtil.click(logout)
     logout_button = UiUtil.find_element('login', 'logout_button')
     UiUtil.click(logout_button)
Example #24
0
 def input_cusphone(self, customerphone):
     cphone = self.driver.find_element_by_id('customerphone')
     UiUtil.input(cphone, customerphone)