Problems with Pop up Dialog

Please paste the permalink to the page in question below:

If asking about a particular script please copy your script or relevant snippet below:

if (isAlertPresent() === true){

Please share your question/describe your issue below. Include any screenshots that may help us understand your question:

I get the below message. If I do not do a check for the error dialog, it tells me there was an unexpected error dialog. When I try to process the error dialog, I get the below. I am also not getting a screen shot, even if I force one, so I am not certain what the synthetics browser is looking at. If I use chrome manually, a browser alert dialog opens.

Browser script execution FAILED.

NoSuchAlertError: no alert open
(Session info: chrome=44.0.2403.157)
(Driver info: chromedriver=2.19.346067 (6abd8652f8bc7a1d825962003ac88ec6a37a82f1),platform=Linux 3.13.0-40-generic x86_64)
at new bot.Error (/opt/minion/node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
at (/opt/minion/node_modules/selenium-webdriver/lib/atoms/response.js:109:9)
at /opt/minion/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:379:20
at promise.ControlFlow.runInFrame_ (/opt/minion/node_modules/selenium-webdriver/lib/goog/…/webdriver/promise.js:1857:20)
at goog.defineClass.notify (/opt/minion/node_modules/selenium-webdriver/lib/goog/…/webdriver/promise.js:2448:25)
at promise.Promise.notify_ (/opt/minion/node_modules/selenium-webdriver/lib/goog/…/webdriver/promise.js:564:12)
at Array.forEach (native)
at promise.Promise.notifyAll_ (/opt/minion/node_modules/selenium-webdriver/lib/goog/…/webdriver/promise.js:553:15)
at (/opt/minion/node_modules/selenium-webdriver/lib/goog/async/run.js:130:15)
at runMicrotasksCallback (node.js:337:7)

As I understand it, im doing what I should be. In the python code I ported this over from, i am using the below and it works just fine.

alert = wd.switch_to_alert()
if alert:

If anyone could point me in the right direction, I would appreciate it.

Hi @plaposta - If it is an alert generated from the browser then I think you need the alertIsPresent() method.

There is also this post which explains interacting with alert boxes.

Thank you! I was stuck on the helper function created by the SE Driver. I should have just used the alertIsPresent() to begin with. I appreciate the input! Thank you very much!