Skip to content

Commit d6fc08c

Browse files
authored
Merge pull request #352 from seleniumbase/w3c-support
Adding w3c Chromedriver support
2 parents 6e19297 + aaa4afb commit d6fc08c

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

seleniumbase/console_scripts/sb_install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ def main():
7171
inner_folder = None
7272

7373
if name == "chromedriver":
74-
latest_version = "2.46"
74+
latest_version = "2.44" # It's not the latest, but most compatible
7575
if "darwin" in sys_plat:
7676
file_name = "chromedriver_mac64.zip"
7777
elif "linux" in sys_plat:
78-
latest_version = "2.40" # Linux machines may need the old driver
78+
latest_version = "2.44" # Linux machines may need the old driver
7979
file_name = "chromedriver_linux64.zip"
8080
elif "win32" in sys_plat or "win64" in sys_plat or "x64" in sys_plat:
8181
file_name = "chromedriver_win32.zip" # Works for win32 / win_x64

seleniumbase/core/browser_launcher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def _set_chrome_options(
109109
}
110110
}
111111
chrome_options.add_experimental_option("prefs", prefs)
112+
chrome_options.add_experimental_option("w3c", True)
112113
if enable_sync:
113114
chrome_options.add_experimental_option(
114115
"excludeSwitches", ["disable-sync"])

seleniumbase/fixtures/js_utils.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,12 @@ def highlight_with_jquery_2(driver, message, selector, o_bs, msg_dur):
592592

593593

594594
def scroll_to_element(driver, element):
595-
element_location = element.location['y']
595+
element_location = None
596+
try:
597+
element_location = element.location['y']
598+
except Exception:
599+
element.location_once_scrolled_into_view
600+
return
596601
element_location = element_location - 130
597602
if element_location < 0:
598603
element_location = 0
@@ -611,7 +616,12 @@ def slow_scroll_to_element(driver, element, browser):
611616
scroll_to_element(driver, element)
612617
return
613618
scroll_position = driver.execute_script("return window.scrollY;")
614-
element_location = element.location['y']
619+
element_location = None
620+
try:
621+
element_location = element.location['y']
622+
except Exception:
623+
element.location_once_scrolled_into_view
624+
return
615625
element_location = element_location - 130
616626
if element_location < 0:
617627
element_location = 0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
setup(
1919
name='seleniumbase',
20-
version='1.26.3',
20+
version='1.26.4',
2121
description='Fast, Easy, and Reliable Browser Automation & Testing.',
2222
long_description=long_description,
2323
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)