def setUp(self): browser = BrowserEngine(self) self.driver = browser.open_browser(self) # 读取浏览器类型 driver = self.driver # 调用登录函数,默认username='******',password='******' self.lg = login(driver) directory = DirectoryList(driver) # 考勤设置-考勤体系-新建考勤体系 directory.three_level_select("考勤设置", '考勤体系', '新建考勤体系')
def setUp(self): browser = BrowserEngine(self) self.driver = browser.open_browser(self) # 读取浏览器类型 sleep(1) driver = self.driver directory = DirectoryList(driver) # 调用登录函数,默认username='******',password='******' self.lg = login(driver) # 考勤设置-考勤列表-加班类型 directory.three_level_select("考勤设置", "考勤列表", "加班类型")
def setUp(self): browser = BrowserEngine(self) self.driver = browser.open_browser(self) # 读取浏览器类型 driver = self.driver # 调用登录函数,默认username='******',password='******' self.lg = login(driver) directory = DirectoryList(driver) # 系统管理-权限管理-用户组管理 directory.three_level_select("系统管理", '权限管理', '用户组管理')
def setUp(self): browser = BrowserEngine(self) self.driver = browser.open_browser(self) # 读取浏览器类型 sleep(1) driver = self.driver directory = DirectoryList(driver) # 调用登录函数,默认username='******',password='******' self.lg = login(driver) # 考勤设置-考勤列表-加班类型 directory.three_level_select("考勤设置", "考勤列表", "休假类型") # 将滚动条拉到最底层 js1 = "window.scrollTo(0,100)" driver.execute_script(js1) sleep(1)
def setUp(self): browser = BrowserEngine(self) self.driver = browser.open_browser(self) # 读取浏览器类型 driver = self.driver # 调用登录函数,默认username='******',password='******' self.lg = login(driver) directory = DirectoryList(driver) # 考勤设置-考勤体系-新建考勤体系 directory.three_level_select("考勤设置", '考勤体系', '考勤期段管理') # 选择考勤体系 driver.find_element_by_xpath( "//section/section/header/div/div/..//input").click() # 大陆门店考勤 driver.find_element_by_xpath( "//section/section/header/div/div/..//span[contains(text(),'香港门店考勤')]" ).click()
def setUp(self): browser = BrowserEngine(self) self.driver = browser.open_browser(self) # 读取浏览器类型 driver = self.driver directory = DirectoryList(driver) # login.login(self, 'peter', 1234567) # 调用登录函数,默认username='******',password='******' login(driver) sleep(1) # sleep(1) directory.three_level_select('考勤设置', '考勤列表', '休假类型') # 将滚动条拉到最底层 js1 = "window.scrollTo(0,100)" driver.execute_script(js1) sleep(1)