class BasePage(object): def __init__(self): self.d = Pyse('chrome') def url(self): self.d.open('http://zbox.imdsx.cn') def quit(self): self.d.quit()
class BasePage(object): def __init__(self): self.pyse = Pyse('chrome') def open(self, url): self.pyse.open(url) def close(self): self.pyse.close() def quit(self): self.pyse.quit()
class BasePage(): def __init__(self): self.d = Pyse('chrome') self.driver = self.d.driver def url(self): self.d.open("http://ui.imdsx.cn/uitester/") def top(self): self.d.js("window.scrollTo(0,0)") def quit(self): self.d.quit()
class BasePage(object): #初始化一个浏览器对象 def __init__(self): self.pyse = Pyse('chrome') #发送一个Http请求 def open(self, url): self.pyse.open(url) #关闭当前页面 def close(self): self.pyse.close() #关闭程序 def quit(self): self.pyse.quit()
class Basepage(object): def __init__(self): self.pyse = Pyse('chrome') def open(self,url): self.pyse.open(url) def max_browser(self): self.pyse.max_window() def quit(self): self.pyse.quit() def close(self): self.pyse.close() def switch(self): self.pyse.open_new_window()
class BasePage(): def __init__(self): self.d = Pyse('chrome') self.driver = self.d.driver def add_cookies(self): cookies = '136a3d03-9748-4f83-a54f-9b2a93f979a0=1e348032-82cd-46e3-b419-4ef8acb912dc;' self.d.set_cookies(cookies) def url(self): self.d.open("https://testyyfax8446.yylending.com/web/user/index.html") def top(self): self.d.js("window.scrollTo(0,0)") def quit(self): self.d.quit() def close(self): self.d.close()