You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ActionChains.pause to work as described in documentation.
Actual Behavior -
Traceback.
Steps to reproduce -
The following code:
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get("http://www.google.com")
elem = driver.find_element_by_name("q")
actions = ActionChains(driver)
actions.key_down(Keys.CONTROL, elem)
actions.pause(1)
actions.key_up(Keys.CONTROL, elem)
actions.perform()
driver.close()
generates the following error:
Traceback (most recent call last):
File "C:/Users/hugod/PycharmProjects/action_chain_pause/main", line 108, in
actions.perform()
File "C:\Users\hugod\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\action_chains.py", line 83, in perform
action()
File "C:\Users\hugod\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\action_chains.py", line 323, in
time.sleep(seconds)
File "C:\Users\hugod\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 306, in execute
response = self.command_executor.execute(driver_command, params)
File "C:\Users\hugod\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 459, in execute
command_info = self._commands[command]
KeyError: None
Process finished with exit code 1
I found issue #4795 while looking for bug reports. The resulting traceback is slightly different though and I wasn't sure if it has the same root cause or is the same issue altogether. For me, replacing this code (in action_chains.py):
Duplicate of #4795. See my comment in that issue referencing the commit that fixes it. It just hasn't been released yet, it will be in the next release.
Uh oh!
There was an error while loading. Please reload this page.
Meta -
OS:
Windows 10
Selenium Version:
3.6.0
Browser:
Chrome
Browser Version:
61.0.3163.100 (Official Build) (64-bit)
Expected Behavior -
ActionChains.pause to work as described in documentation.
Actual Behavior -
Traceback.
Steps to reproduce -
The following code:
generates the following error:
I found issue #4795 while looking for bug reports. The resulting traceback is slightly different though and I wasn't sure if it has the same root cause or is the same issue altogether. For me, replacing this code (in action_chains.py):
with this:
fixed the issue. No traceback and the behaviour looks as desired (a pause between actions in the action chain execution).
Apologies if this is a duplicate.
The text was updated successfully, but these errors were encountered: