What work is required to implement the "handlesAlerts" capabilities as defined in GhostDriver?

50 views
Skip to first unread message

mic...@mwarddev.com

unread,
Jun 29, 2017, 3:24:53 PM6/29/17
to phantomjs
I've read quite a bit of the PhantomJS source code in the past couple weeks, and I'd like to know what your opinions are on how this should be handled.

The company I work for aggregates data from various sources, and unfortunately, those sources use a common platform which has started delivering vital information via alerts, prompts, and confirms. Our scrapes are written using Selenium WebDriver's PhantomJS/Python API, and the hacks we had previously used to circumvent the lack of support have become unmaintainable.


I was thinking, if adding support is too complicated, that I could use this technique to add a few private properties to the "this" (the webpage instance), and use the onAlert callback to add logic for how to handle the alerts. However, the problem is that I need that alert to immediately be propagated back to the WebDriver.

If adding support to handle alerts is too much, suggestions for implementing the ideas above would also be appreciated!


Thank you for your time!

Reply all
Reply to author
Forward
0 new messages