This repository was archived by the owner on Nov 29, 2018. It is now read-only.
This repository was archived by the owner on Nov 29, 2018. It is now read-only.
IE: element.click() != ActionChains(...).click(element).perform() #7620
Open
Description
Originally reported on Google Code with ID 7620
What steps will reproduce the problem?
Execute the following commands using the Python bindings:
from selenium.webdriver import Ie
from selenium.webdriver.common.action_chains import ActionChains
ie = Ie()
ie.get("http://www.mediacollege.com/internet/javascript/basic/alert.html")
button = ie.find_element_by_xpath("//input[@value='Click Here']")
# This works:
button.click()
ie.switch_to.alert.accept()
# This doesn't:
ActionChains(ie).click(elt).perform()
What is the expected output? What do you see instead?
I would expect the last line `ActionChains(ie)...` to have the same effect as the line
`button.click()`: To open an alert dialog on the page. Instead, the "Click Here" button
remains in a strange state that visually looks like it was hovered (it turns blue on
the page).
Selenium version: 2.41.0
OS: 64 bit Windows 7
Browser: IE
Browser version: 11.0.9600.17207, Update Versions 11.0.10 (KB2962872)
IEDriver version: 2.41.0.0 & 2.42.0.0
As a workaround, I tried
ActionChains(ie).move_to_element(button).click().perform()
This doesn't leave the "Click Here" button in a "hovered" state, but also doesn't open
the JS alert dialog.
Reported by [email protected]
on 2014-07-17 11:25:17