def test_login(self): #self.driver = webdriver.Chrome('C:\\Users\\bwaite\\Drivers\\chromedriver.exe') self.driver = webdriver.Chrome('/Users/bzhuang/Downloads/chromedriver') self.driver.get("https://openrecords-test.appdev.records.nycnet/") #self.driver.get("https://a860-openrecords.csc.nycnet/") log_in = loginpage.LoginPage(self.driver) log_in.login(self.user_type) time.sleep(1) # request = requestrecordpage.RequestPage(self.driver) # request.request(self.user_type) # request = publicrequestpage.RequestPage(self.driver) # request.agency_request(self.user_type) # request = nypdrequest.nypdrequest(self.driver) # request.nypdrequestfun(self.user_type) # contact = contactagency.ContactAgency(self.driver) # contact.contact(self.user_type) # techsup = techsupport.TechSupport(self.driver) # techsup.techsupport(self.user_type) # users = manageresponses.Responses(self.driver) # users.responses(self.user_type) logout = logoutpage.LogoutPage(self.driver) logout.logout(self.user_type)
def logout(self): login_page = loginpage.LoginPage(self.driver) is_login=login_page.login_wait_check() if is_login: self.click(self.PRIVACY_LOC) self.click(self.LOGOUT_LOC) self.log.debug('账户退出成功!') else: self.log.debug('账户未登录!')
def test_valid_login(self): self.driver = webdriver.Chrome('C:\\Selenium\\chromedriver.exe') self.driver.get("https://openrecords-test.appdev.records.nycnet/") #self.driver.get("https://a860-openrecords.csc.nycnet/") log_in = loginpage.LoginPage(self.driver) log_in.login() request = agencyrequestpage.RequestPage(self.driver) request.agency_request()
def main(): driver=webdriver.Chrome() baseurl='http://www.raincard.cn/management/login.html' a=loginpage.LoginPage(driver) a.open() a.input_username('*****@*****.**') a.input_password('123456') a.click_submit() b=Logout(driver) b.logout()
def setUpClass(self): self.dr = webdriver.Chrome() self.dr.maximize_window() self.dr.implicitly_wait(10) # 后台建标需先登录,登录操作 self.lgpg = loginpage.LoginPage(self.dr) self.lgpg.open() self.lgpg.login() # 引用后台新建标的page self.create_page = createprojectpage.CreateNew(self.dr) self.create_page.open()
def test_login(self): #self.driver = webdriver.Chrome('C:\\Users\\bwaite\\Drivers\\chromedriver.exe') self.driver = webdriver.Chrome('/Users/bzhuang/Downloads/chromedriver') self.driver.get("https://openrecords-test.appdev.records.nycnet/") #self.driver.get("https://a860-openrecords.csc.nycnet/") log_in = loginpage.LoginPage(self.driver) log_in.login(self.user_type) time.sleep(1) contact = contactagency.ContactAgency(self.driver) contact.contact(self.user_type) logout = logoutpage.LogoutPage(self.driver) logout.logout(self.user_type)
def test_handle(self): #self.driver = webdriver.Chrome('C:\\Users\\bwaite\\Drivers\\chromedriver.exe') self.driver = webdriver.Chrome('/Users/bzhuang/Downloads/chromedriver') self.driver.get("https://openrecords-test.appdev.records.nycnet/") #self.driver.get("https://a860-openrecords.csc.nycnet/") log_in = loginpage.LoginPage(self.driver) log_in.login(self.user_type) time.sleep(1) handle = handlerequest.HandleRequest(self.driver) handle.handle_request(self.user_type) logout = logoutpage.LogoutPage(self.driver) logout.logout(self.user_type)
def test_login(self): #self.driver = webdriver.Chrome('C:\\Users\\bwaite\\Drivers\\chromedriver.exe') self.driver = webdriver.Chrome('/Users/bzhuang/Downloads/chromedriver') self.driver.get("https://openrecords-test.appdev.records.nycnet/") #self.driver.get("https://a860-openrecords.csc.nycnet/") log_in = loginpage.LoginPage(self.driver) log_in.login(self.user_type) search = searchrequestpage.RequestPage(self.driver) search.search_foil_id(self.user_type) #search.search_title(self.user_type) #search.search_closed_date(self.user_type) logout = logoutpage.LogoutPage(self.driver) logout.logout(self.user_type)
def setUpClass(cls): cls.driver = webdriver.Chrome() cls.url = 'http://www.raincard.cn/management/login.html' cls.login_page = loginpage.LoginPage(cls.driver) cls.login_page.open() cls.logout = logout.Logout(cls.driver)
def setUpClass(self): self.dr = my_driver() self.lg = loginpage.LoginPage(self.dr) self.mp = myaccountpage.MyacountPage(self.dr) self.lg.open()
def setUpClass(self): self.dr = webdriver.Chrome() self.lgpg = loginpage.LoginPage(self.dr) self.lgpg.open()
def main(): driver = webdriver.Chrome() a = loginpage.LoginPage(driver) a.move_time('2019-03-27 21:44:00', 'day', -1)