1

I am trying to automate testing for a site that uses an iFrame(?) sort of punch-out which links to another website's catalogue to make purchases. The process is the user will login and be able to select a set of catalogues to connect to. Upon clicking a catalogue set they will be prompted w/ this security dialog: IE Security Dialog

and once they click 'Show all content' they are prompted w/ this: IE Prompt 02

This will take them to the actual catalogue site where they can place orders. Is there any way to interact w/ these prompts?

Milo
  • 3,365
  • 9
  • 30
  • 44
  • 1
    Hi Milo, Selenium on its own cannot handle these Pop Ups. May be additional Extension tools can help.To be frank im not aware of such tools and usage – Siva Aug 31 '16 at 13:28

2 Answers2

1

Try AutoIT, It can click on the screen using windows ids https://www.autoitscript.com/site/autoit/

It'll create an exe and just call the exe whenever you like.

marwaha.ks
  • 540
  • 1
  • 7
  • 19
1

Selenium Webdriver is not able to interact with native browser popups. It does with JavaScript alerts and dialogs but that's not what you are trying to do.

The common solution to working with dialogs (file uploads, login dialogs) is to circumvent them by sending the file data or login info to the HTTP request.

See this question or this question for examples of these two scenarios. In your case you can't do that.

You could use another product (something other than Selenium) or change the IE configuration or the setup/environment of the tests so you are not prompted by these security alerts.

For example, for your first alert: "Only secure content is displayed", you can disable it by going in the IE options, security, Custom Level and then disabling Display non secure items.

Community
  • 1
  • 1
Gilles
  • 5,269
  • 4
  • 34
  • 66