Esempio n. 1
0
    def wd(self):
        log.wd("{0} Starting ...".format(self.name))

        if self.name == "FIREFOX":
            driver = webdriver.Firefox()
        elif self.name == "CHROME":
            try:
                os.environ["webdriver.chrome.driver"] = config.CHROMEDRIVER
                driver = webdriver.Chrome(config.CHROMEDRIVER)
            except:
                return "chromeError"
        elif self.name == "IE":
            try:
                os.environ["webdriver.ie.driver"] = config.IEDRIVER
                driver = webdriver.Ie(config.IEDRIVER)
            except:
                return "IeError"
        else:
            return "config.BROWSER Error"
        log.wd("{0} Started  Successfully!".format(self.name))
        return driver
Esempio n. 2
0
def addTS(t=st):
    time.sleep(t)
    log.wd("Time Sleep {0} seconds.".format(t))
Esempio n. 3
0
def addIT():
    driver.implicitly_wait(it)
    log.wd("Implicitly waiting for {0} seconds.".format(it))
Esempio n. 4
0
def quitAndClear():
    time.sleep(st)
    driver.quit()
    log.wd("Driver ->  Quit & Clear")
    os.popen("TASKKILL /F /IM IEDriverServer.exe")
    os.popen("TASKKILL /F /IM chromedriver.exe")