Jump to content

Accessing the Information Bar in IE


 Share

Recommended Posts

We have a internal website that requires loading an ActiveX control. When you browse to the site for the first time you get a pop-up window asking, "Did you notice the Information Bar?" with an OK button.

When you click the OK button you have the yellow Information Bar at the top of the page that says "This site may require software from... Click here to install..." When you click on the Information Bar you get a menu that includes an option to "Install ActiveX Control."

How can I use AutoIt to click on "Install ActiveX Control"? I've been able to get it to click on the Information Bar and the menu pops-up but I can't get it to click on that option.

Below is the snippet that I have so far.

Thanks,

Carlos

#include <IE.au3>
$oIE = _IECreate ("http://website/IDXWEB", 0, 1, 0); open IE to web page
WinWait("Information Bar", "The Information Bar alerts", 15); Wait for window warning about Info Bar
ControlClick("Information Bar", "The Information Bar alerts", "[ID:1]"); Click on OK button
ControlClick("IDX Web Framework", "", "[CLASS:Button; INSTANCE:1]"); Click on Information Bar
Link to comment
Share on other sites

We have a internal website that requires loading an ActiveX control. When you browse to the site for the first time you get a pop-up window asking, "Did you notice the Information Bar?" with an OK button.

When you click the OK button you have the yellow Information Bar at the top of the page that says "This site may require software from... Click here to install..." When you click on the Information Bar you get a menu that includes an option to "Install ActiveX Control."

How can I use AutoIt to click on "Install ActiveX Control"? I've been able to get it to click on the Information Bar and the menu pops-up but I can't get it to click on that option.

Below is the snippet that I have so far.

Thanks,

Carlos

#include <IE.au3>
$oIE = _IECreate ("http://website/IDXWEB", 0, 1, 0); open IE to web page
WinWait("Information Bar", "The Information Bar alerts", 15); Wait for window warning about Info Bar
ControlClick("Information Bar", "The Information Bar alerts", "[ID:1]"); Click on OK button
ControlClick("IDX Web Framework", "", "[CLASS:Button; INSTANCE:1]"); Click on Information Bar
Is there time between clicking on one button and the next dialog becoming available? Perhaps WinWait("IDX Web Framework") before trying to click on it?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

@Volly

I don't want to have to mess with the security settings. These are internal clients only so I could probably disable the security temporarily to install the Control, but I'd rather not have to go that route.

@PsaltyDS

The last line gets me to the point that I want to get to, displaying the menu with the option to "Install ActiveX Control" but I can't click on that option. It's similar to the message you get when you install Flash, Acrobat Reader, or Shockwave for the first time.

Thanks!

Link to comment
Share on other sites

I want to get to, displaying the menu with the option to "Install ActiveX Control" but I can't click on that option.

the fact that you can't click the MenuItem, doesn't mean you cannot activate it in another way.

for example...

Send("{Down}")

Send("{Enter}")

also you might want to add a Sleep(500) before those Send()s, to make sure they are sent after the Menu appears.

I myself haven't found a way to figure out when a ContextMenu has opened(I needed something like WinWaitActive(), but for Menus.. like "MenuWaitActive()" :) )

Edited by Zohar
Link to comment
Share on other sites

@Zohar

You got me going in the right direction. My last line brings up the menu with the "Install ActiveX Control" option so that menu is active. I did a send("{DOWN}") and send("{ENTER}") and that started the installation process. Now I can wait for the Security pop-ups asking if I want to "Install" or "Don't Install" and do ControClick's.

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...