Skip to content

Commit

Permalink
Allow ActionChains when using Remote WebDriver (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfehler authored and andrewsmedina committed Dec 2, 2019
1 parent 282e828 commit a574862
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 73 deletions.
37 changes: 1 addition & 36 deletions splinter/driver/webdriver/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from splinter.driver.webdriver import (
BaseWebDriver,
WebDriverElement as BaseWebDriverElement,
WebDriverElement,
)
from splinter.driver.webdriver.cookie_manager import CookieManager

Expand Down Expand Up @@ -46,38 +46,3 @@ def __init__(
self._cookie_manager = CookieManager(self.driver)

super(WebDriver, self).__init__(wait_time)


class WebDriverElement(BaseWebDriverElement):
def mouse_over(self):
"""
Remote Firefox doesn't support mouseover.
"""
raise NotImplementedError("Remote Firefox doesn't support mouse over")

def mouse_out(self):
"""
Remote Firefox doesn't support mouseout.
"""
raise NotImplementedError("Remote Firefox doesn't support mouseout")

def double_click(self):
"""
Remote Firefox doesn't support doubleclick.
"""
raise NotImplementedError("Remote Firefox doesn't support doubleclick")

def right_click(self):
"""
Remote Firefox doesn't support right click'
"""
raise NotImplementedError("Remote Firefox doesn't support right click")

def drag_and_drop(self, droppable):
"""
Remote Firefox doesn't support drag and drop
"""
raise NotImplementedError("Remote Firefox doesn't support drag an drop")

mouseover = mouse_over
mouseout = mouse_out
36 changes: 0 additions & 36 deletions tests/test_webdriver_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,42 +42,6 @@ def test_support_with_statement(self):
with Browser("remote"):
pass

def test_mouse_over(self):
"Remote should not support mouseover"
with self.assertRaises(NotImplementedError):
self.browser.find_by_id("visible").mouse_over()

def test_mouse_out(self):
"Remote should not support mouseout"
with self.assertRaises(NotImplementedError):
self.browser.find_by_id("visible").mouse_out()

def test_mouse_out_top_left(self):
"Remote should not support mouseout"
with self.assertRaises(NotImplementedError):
self.browser.find_by_id("visible").mouse_out()

def test_double_click(self):
"Remote should not support double_click"
with self.assertRaises(NotImplementedError):
self.browser.find_by_id("visible").double_click()

def test_right_click(self):
"Remote should not support right_click"
with self.assertRaises(NotImplementedError):
self.browser.find_by_id("visible").right_click()

def test_drag_and_drop(self):
"Remote should not support drag_and_drop"
with self.assertRaises(NotImplementedError):
droppable = self.browser.find_by_css(".droppable")
self.browser.find_by_css(".draggable").drag_and_drop(droppable)

def test_mouseover_should_be_an_alias_to_mouse_over(self):
"Remote should not support mouseover"
with self.assertRaises(NotImplementedError):
self.browser.find_by_id("visible").mouseover()

def test_should_be_able_to_change_user_agent(self):
"Remote should not support custom user agent"
pass
2 changes: 1 addition & 1 deletion travis-install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fi
if [ "${DRIVER}" = "tests/test_webdriver_remote.py" ]; then
sleep 1

wget https://goo.gl/s4o9Vx -O selenium-server.jar
wget https://selenium-release.storage.googleapis.com/3.10/selenium-server-standalone-3.10.0.jar -O selenium-server.jar
java -jar selenium-server.jar > /dev/null 2>&1 &
sleep 1
fi
Expand Down

0 comments on commit a574862

Please sign in to comment.