Click on hidden element works on Chrome, but not on Firefox and IE
I have a scenario that when I move mouse over a web element, a hidden image display, and click on it pop up an alert box for now. The following piece of code works well on Chrome, but the same code won't work in Firefox and IE. In Firefox click won't open alert box, and complain "No alert present", in IE it says "element no longer valid" at the statement of img.click()
element(by.css("... ...")).then(function(element) {
ptor.actions().
mouseMove(element).
perform();
element(by.css("... ...")).then(function(img) {
img.click();
var alertDialog = browser.switchTo().alert();
alertDialog.accept();
})
});
It seems to be a bug in Firefox and IE, click on hidden element won't work in these browsers, but works well in Chrome.
I'm using the latest version of Protractor: version 1.0.0
The latest version of protractor is 1.1.1
Have you tried doing these manually in those browsers?
This is probably an issue with IE/Firefox implementations of webdriver. Could you share the HTML/css for your hidden element?
I'm going through and cleaning up by closing stale questions. Please re-open if there is a current bug or feature request. If you have a question, consider Stack Overflow.