Open GoogleCodeExporter opened 9 years ago
We need to implement JavaScriptDialogManager::HandleJavaScriptDialog in our
CefJavaScriptDialogManager for this feature of selenium to work.
Original comment by Daniel.S...@gmail.com
on 3 Nov 2013 at 3:07
What we are seeing is that all future calls to the web driver fail with an
"There was an unexpected Alert! " error. Note that we have dismissed the alert
by clicking the accept button with our testing tool (Test Complete). This is a
huge problem since all our web driver tests fail as soon as a JavaScript alert
comes up. Is there an ETA on this issue?
Original comment by jkeno...@connectwise.com
on 15 Jan 2014 at 9:24
[deleted comment]
Hi!
After debugging the issue. Here is a little info about what is happening.
When using cef without a webdriver the alert/confirm/prompt window is created
and given a windows callback function CefJavaScriptDialog::DialogProc. This way
whenever the user gets an alert and clicks on accept, the callback is triggered.
This is what happens when using chromeDriver:
Instead of clicking the accept button and triggering a callback,
ChromeDriver sends a message to cef telling what to do. Something like this:
{\"id\":42,\"method\":\"Page.handleJavaScriptDialog\",\"params\":{\"accept\":tru
e,\"promptText\":\" ## ACCEPT ME ## \"}}
This is telling cef to accept the prompt and to set the text to ## ACCEPT ME
##.This is the mechanism chromedriver uses with cef to simulate a click on an
alert. This was not working because
JavaScriptDialogManager::HandleJavaScriptDialog was not properly implemented.
To see this message you can put a breakpoint in
DevToolsHttpHandlerImpl::OnWebSocketMessage.
This message triggers JavaScriptDialogManager::HandleJavaScriptDialog in cef.
Since CefJavaScriptDialogManager inherits from JavaScriptDialogManager,
we only have to implement HandleJavaScriptDialog by imitating the behaviour
of the windows callback.
I will post a patch soon.
Micael
Original comment by micael.l...@gmail.com
on 14 Sep 2014 at 2:30
Hi all,
Here is the patch.
Download the files, build libcef.dll
and have fun.
Please try it and post your comments.
Micael
Original comment by micael.l...@gmail.com
on 15 Sep 2014 at 11:16
Attachments:
Forgot to say:
The location of these files is: src\cef\libcef\browser
Original comment by micael.l...@gmail.com
on 15 Sep 2014 at 11:17
CEF is transitioning from Google Code to Bitbucket project hosting. If you
would like to continue receiving notifications on this issue please add
yourself as a Watcher at the new location:
https://bitbucket.org/chromiumembedded/cef/issue/1128
Original comment by magreenb...@gmail.com
on 14 Mar 2015 at 3:28
Original issue reported on code.google.com by
amboo.sr...@gmail.com
on 1 Nov 2013 at 7:11Attachments: