Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
wires fails to handle ActionChain with Keys #41
Attempting to perform an
from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.desired_capabilities import DesiredCapabilities firefox_capabilities = DesiredCapabilities.FIREFOX.copy() firefox_capabilities['marionette'] = True firefox_capabilities['binary'] = '/Applications/FirefoxNightly.app/Contents/MacOS/firefox' driver = webdriver.Firefox(capabilities=firefox_capabilities) driver.get('data:text/html,<a href="https://mozilla.org">Click This!</a>') tag = driver.find_element_by_tag_name("a") # Simulate ctrl-shift clicking the anchor tag. action = ActionChains(driver) ctrl_key = Keys.COMMAND # mac #ctrl_key = Keys.CONTROL # not mac action.key_down(ctrl_key).key_down(Keys.SHIFT).click(tag).key_up(Keys.SHIFT).key_up(ctrl_key).perform()
I get the same error without an action chain in wires 0.8 (which has actually been renamed to geckodriver) on Firefox 47, Linux x64. I'm just sending an ENTER key using PHP:
$webDriver->execute(DriverCommand::SEND_KEYS_TO_ACTIVE_ELEMENT, array( 'value' => array(WebDriverKeys::ENTER), ));
Selenium standalone 2.53.0 fails with:
Please note that geckodriver implements action pipelining as described in the WebDriver specification, not Selenium.
For these reasons I’m going to close this ticket as it refers to Selenium-specific behaviour.
I receive the error: