def findele(self, *args): try: print(args) log("通过" + args[0] + "定位,元素是" + args[1]) return self.driver.find_element(*args) except: # 在页面上没有定位到相应的元素 log("定位元素失败!")
def book_btn(self): try: time.sleep(10) self.book().click() except: log("车次查询失败") None time.sleep(10) return self.url()
def intializeLoggerModule(fileName, name): log(fileName, name)
def initialize(filename, name): log(filename, name)
def initialize(filename,name): log(filename,name)
def intializeLoggerModule(fileName,name): log(fileName,name)
def __init__(self, driver): self.driver = driver self.mylog = log.log()
def __init__(self): self.mylog = log.log()