0

I am using WebdriverIO in the WebStorm IDE and I am testing a web application that requires Adobe Flash Player to be enabled in order to continue. I am trying to verify that a browser's notification displays (see below image). I am not looking to click/select "allow" or "block", I am only testing to see if the notification displays in the browser.

How could I accomplish this? I would be testing a variety of different browsers including Chrome, Firefox, Internet Explorer, Microsoft Edge, and Safari.

Browser notification example

I also understand that there are methods such as getAlertText, acceptAlert, and dismissAlert, however none of these methods are recognized or executed in my IDE.

Should these methods work? How could I get these methods to work?

If any more information is needed, I'll be happy to comply.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Brian
  • 135
  • 4
  • 16
  • Hey Brian! So let me get this straight: You are ***"only testing to see if the notification displays in the browser. I would be testing a variety of different browsers including Chrome, Firefox, Internet Explorer, Microsoft Edge, and Safari."*** I'll just spare your the trouble and say first hand this is close to impossible. You could make it work on some browsers, but there hardly could be a homogenous solution (*constant across all browsers*) imhho. SO, **that's a hard NO!**. – iamdanchiv Jan 05 '19 at 06:07
  • First off, you want to check **notifications**, not **alert boxes**, so of course those methods you just mentioned won't work. Secondly, as some pointers I can off the top of my head think of 2-3 ways it could be done, but you have to put in the work & research. **1.** Try using a Visual Regression tool and check if that notification appeared in your predefined section; **2.** Get a NodeJS intercept library & see if you can validate that notification; I'll update if I find an easy way to do it. But right now I cannot think of anything other than disabling the notifications altogether. – iamdanchiv Jan 05 '19 at 06:15

0 Answers0