Skip to content

Commit ecde43c

Browse files
committed
FIX: Ajust in edge browser run selenium 3
1 parent b5ec47a commit ecde43c

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

botcity/web/browsers/edge.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,26 @@
55
import time
66
from typing import Dict
77

8-
# from msedge.selenium_tools import Edge, EdgeOptions # noqa: F401, F403
8+
from msedge.selenium_tools import Edge, EdgeOptions # noqa: F401, F403
99
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
10-
from selenium.webdriver.edge.options import Options
11-
from selenium.webdriver import Edge # noqa: F401, F403
1210

1311
from ..util import cleanup_temp_dir
1412

1513

1614
def default_options(headless=False, download_folder_path=None, user_data_dir=None,
17-
page_load_strategy="normal") -> Options:
15+
page_load_strategy="normal") -> EdgeOptions:
1816
"""Retrieve the default options for this browser curated by BotCity.
19-
2017
Args:
2118
headless (bool, optional): Whether or not to use the headless mode. Defaults to False.
2219
download_folder_path (str, optional): The default path in which to save files.
2320
If None, the current directory is used. Defaults to None.
2421
user_data_dir ([type], optional): The directory to use as user profile.
2522
If None, a new temporary directory is used. Defaults to None.
2623
page_load_strategy (str, optional): The page load strategy. Defaults to "normal".
27-
2824
Returns:
2925
EdgeOptions: The Edge options.
3026
"""
31-
edge_options = Options()
27+
edge_options = EdgeOptions()
3228
try:
3329
page_load_strategy = page_load_strategy.value
3430
except AttributeError:
@@ -121,7 +117,6 @@ def default_options(headless=False, download_folder_path=None, user_data_dir=Non
121117

122118
def default_capabilities() -> Dict:
123119
"""Fetch the default capabilities for this browser.
124-
125120
Returns:
126121
Dict: Dictionary with the default capabilities defined.
127122
"""
@@ -140,4 +135,4 @@ def wait_for_downloads(driver):
140135
.querySelectorAll('[role="listitem"]'));
141136
if(items.every(e => e.querySelector('[role="progressbar"]') == null))
142137
return true;
143-
""")
138+
""")

0 commit comments

Comments
 (0)