Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/swag_labs_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_swag_labs_basic_functional_flow(self, username):
# Finish Checkout and verify the item was removed from the cart
self.click("link=FINISH")
self.assert_exact_text("THANK YOU FOR YOUR ORDER", "h2")
self.assert_element("div.pony_express")
self.assert_element("img.pony_express")
self.click("#shopping_cart_container path")
self.assert_element_absent("div.inventory_item_name")
self.click(continue_shopping_button)
Expand Down
4 changes: 2 additions & 2 deletions examples/test_apple_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ def test_apple_developer_site_webdriver_instructions(self):
title = "Testing with WebDriver in Safari"
self.type('[placeholder*="developer.apple.com"]', title + "\n")
self.click("link=%s" % title)
self.assert_element('[href="/documentation"]')
self.assert_element('div.localnav-content [href*="/documentation/"]')
self.assert_text(title, "h1")
self.highlight("div.topic-description p")
self.highlight("div.description div.abstract")
self.highlight("h2")
h3 = "h3:nth-of-type(%s)"
self.assert_text("Make Sure You Have Safari’s WebDriver", h3 % "1")
Expand Down
2 changes: 1 addition & 1 deletion examples/test_swag_labs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_swag_labs_basic_flow(self):
# Finish Checkout and verify item is no longer in cart
self.click("link=FINISH")
self.assert_exact_text("THANK YOU FOR YOUR ORDER", "h2")
self.assert_element("div.pony_express")
self.assert_element("img.pony_express")
self.click("#shopping_cart_container path")
self.assert_element_absent("div.inventory_item_name")
self.click(continue_shopping_button)
Expand Down
2 changes: 1 addition & 1 deletion examples/test_usefixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def test_usefixtures_on_class(self):
sb.open("https://google.com/ncr")
sb.update_text('input[title="Search"]', 'SeleniumBase\n')
sb.click('a[href*="github.com/seleniumbase/SeleniumBase"]')
sb.assert_text("SeleniumBase", "h1.public")
sb.assert_text("SeleniumBase", 'strong[itemprop="name"]')
sb.assert_text("integrations")
sb.assert_element('a[title="help_docs"]')
sb.click('a[title="examples"]')
12 changes: 12 additions & 0 deletions seleniumbase/fixtures/base_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ def double_click(self, selector, by=By.CSS_SELECTOR, timeout=None):
self.driver, selector, by, timeout=timeout)
actions = ActionChains(self.driver)
actions.double_click(element).perform()
except Exception:
css_selector = self.convert_to_css_selector(selector, by=by)
css_selector = re.escape(css_selector)
css_selector = self.__escape_quotes_if_needed(css_selector)
double_click_script = (
"""var targetElement1 = document.querySelector('%s');
var clickEvent1 = document.createEvent('MouseEvents');
clickEvent1.initEvent('dblclick', true, true);
targetElement1.dispatchEvent(clickEvent1);""" % css_selector)
self.execute_script(double_click_script)
if settings.WAIT_FOR_RSC_ON_CLICKS:
self.wait_for_ready_state_complete()
if self.demo_mode:
Expand Down Expand Up @@ -3875,6 +3885,8 @@ def display_chart(self, chart_name=None, filename=None, interval=0):
interval - The delay time for auto-advancing charts. (in seconds)
If set to 0 (default), auto-advancing is disabled.
"""
if self.headless:
interval = 1 # Race through chart if running in headless mode
if not chart_name:
chart_name = "default"
if not filename:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

setup(
name='seleniumbase',
version='1.44.2',
version='1.44.3',
description='Fast, Easy, and Reliable Browser Automation & Testing.',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down