Skip to content

Commit f9d5fc5

Browse files
authored
Merge pull request #215 from seleniumbase/fix-xpath-hovering
Fix XPath hover methods
2 parents 6ae43d1 + 06c96cf commit f9d5fc5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,7 +2482,8 @@ def jquery_update_text(self, selector, new_value, by=By.CSS_SELECTOR,
24822482

24832483
def hover_on_element(self, selector, by=By.CSS_SELECTOR):
24842484
if page_utils.is_xpath_selector(selector):
2485-
by = By.XPATH
2485+
selector = self.convert_to_css_selector(selector, By.XPATH)
2486+
by = By.CSS_SELECTOR
24862487
if page_utils.is_link_text_selector(selector):
24872488
selector = page_utils.get_link_text_from_selector(selector)
24882489
by = By.LINK_TEXT
@@ -2499,7 +2500,9 @@ def hover_and_click(self, hover_selector, click_selector,
24992500
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
25002501
timeout = self.__get_new_timeout(timeout)
25012502
if page_utils.is_xpath_selector(hover_selector):
2502-
hover_by = By.XPATH
2503+
hover_selector = self.convert_to_css_selector(
2504+
hover_selector, By.XPATH)
2505+
hover_by = By.CSS_SELECTOR
25032506
if page_utils.is_xpath_selector(click_selector):
25042507
click_by = By.XPATH
25052508
if page_utils.is_link_text_selector(hover_selector):

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.16.1',
20+
version='1.16.2',
2121
description='All-In-One Test Automation Framework',
2222
long_description=long_description,
2323
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)