My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2760: executeScript and executeAsyncScript should be able to handle alerts.
12 people starred this issue and may be notified of changes. Back to list
 
Project Member Reported by jmle...@gmail.com, Nov 2, 2011
The behavior of executeScript & executeAsyncScript is currently undefined when there is a call to alert/confirm/prompt while a script is executing.  The most basic example would be:

((JavascriptExecutor) driver).executeScript("window.alert('hi!');");

Ideally, we should be able to detect that this has happened and return an error to the user.
Nov 2, 2011
#1 skybr...@google.com
Or perhaps pass in a list of answers, for cases when you're calling JavaScript that you expect to show alerts?

Feb 1, 2012
Project Member #2 dawagner@gmail.com
This issue was closed by revision r15790.
Status: Fixed
Feb 2, 2012
Project Member #3 dawagner@gmail.com
See also revision 15810
Feb 3, 2012
Project Member #4 jmle...@gmail.com
This is only fixed in Firefox. Let's leave this open until it's fixed in the other drivers too.
Status: Accepted
Owner: dawagner@gmail.com
Cc: jmle...@gmail.com
Nov 17, 2012
#5 ni184775...@gmail.com
I am agree we should be able to handle alert, like close it or pass some prompt.
Jun 8, 2014
Project Member #6 barancev
 Issue 7452  has been merged into this issue.
Cc: james.h....@gmail.com
Jul 22, 2014
#7 ju...@gmx.net
any changes? is it possible to get the message of the alert or confirm in my java 
    environment with the executeScript? Because alert does still not work with ghostdriver or htmlunit driver.
Sign in to add a comment

Powered by Google Project Hosting