def _browserFirefoxRun(self, browserName, lCurPath, browserProxy, randomProxy, desiredCapabilities): executable = helper.browserHelper_getBrowserExecutable(browserName) self._downloadDriverCheck(executable, lCurPath, browserName) profile = webDrv.webdriver_setFirefoxProfile(browserProxy, randomProxy) self.downloadFolder = webDrv.getDownloadFolderFromProfile(profile) logger.debug(f"Firefox Profile as follows:{profile.userPrefs}") return webDrv.BROWSER_DRIVERS[browserName]( options=webDrv.webdriver_createBrowserOptions( browserName=browserName, desiredCapabilities=desiredCapabilities), executable_path=helper.browserHelper_findBrowserDriverPaths( executable), firefox_profile=profile, service_log_path=os.path.join(self.managedPaths.getLogfilePath(), 'geckodriver.log'))
def _browserChromeRun(self, browserName, lCurPath, browserProxy, randomProxy, desiredCapabilities): executable = helper.browserHelper_getBrowserExecutable(browserName) self._downloadDriverCheck(executable, lCurPath, browserName) lOptions = webDrv.webdriver_createBrowserOptions( browserName=browserName, desiredCapabilities=desiredCapabilities, browserMobProxy=browserProxy, randomProxy=randomProxy) self.downloadFolder = webDrv.getDownloadFolderFromChromeOptions( options=lOptions) return webDrv.BROWSER_DRIVERS[browserName]( chrome_options=lOptions, executable_path=helper.browserHelper_findBrowserDriverPaths( executable), service_log_path=os.path.join(self.managedPaths.getLogfilePath(), 'chromedriver.log'))