|
19 | 19 | if "darwin" in PLATFORM or "linux" in PLATFORM:
|
20 | 20 | LOCAL_CHROMEDRIVER = DRIVER_DIR + '/chromedriver'
|
21 | 21 | LOCAL_GECKODRIVER = DRIVER_DIR + '/geckodriver'
|
| 22 | + LOCAL_EDGEDRIVER = DRIVER_DIR + '/msedgedriver' |
22 | 23 | elif "win32" in PLATFORM or "win64" in PLATFORM or "x64" in PLATFORM:
|
23 | 24 | LOCAL_CHROMEDRIVER = DRIVER_DIR + '/chromedriver.exe'
|
24 | 25 | LOCAL_GECKODRIVER = DRIVER_DIR + '/geckodriver.exe'
|
| 26 | + LOCAL_EDGEDRIVER = DRIVER_DIR + '/msedgedriver.exe' |
25 | 27 |
|
26 | 28 |
|
27 | 29 | def get_timestamp():
|
@@ -245,8 +247,22 @@ def build_report(report_log_path, page_results_list,
|
245 | 247 | firefox_profile=profile, executable_path=LOCAL_GECKODRIVER)
|
246 | 248 | else:
|
247 | 249 | browser = webdriver.Firefox(firefox_profile=profile)
|
| 250 | + elif browser_type == 'edge': |
| 251 | + edge_options = webdriver.ChromeOptions() |
| 252 | + edge_options.add_experimental_option( |
| 253 | + "excludeSwitches", ["enable-automation", "enable-logging"]) |
| 254 | + edge_options.add_argument("--test-type") |
| 255 | + edge_options.add_argument("--disable-infobars") |
| 256 | + if LOCAL_CHROMEDRIVER and os.path.exists(LOCAL_EDGEDRIVER): |
| 257 | + browser = webdriver.Chrome( |
| 258 | + executable_path=LOCAL_EDGEDRIVER, options=edge_options) |
| 259 | + else: |
| 260 | + browser = webdriver.Chrome(options=edge_options) |
248 | 261 | else:
|
249 | 262 | chrome_options = webdriver.ChromeOptions()
|
| 263 | + chrome_options.add_experimental_option( |
| 264 | + "excludeSwitches", ["enable-automation", "enable-logging"]) |
| 265 | + chrome_options.add_argument("--test-type") |
250 | 266 | chrome_options.add_argument("--disable-infobars")
|
251 | 267 | if LOCAL_CHROMEDRIVER and os.path.exists(LOCAL_CHROMEDRIVER):
|
252 | 268 | browser = webdriver.Chrome(
|
|
0 commit comments