Jump to content
Sign in to follow this  
Gerry

Unable to logon using IE

Recommended Posts

Gerry

Hi All

I'm trying to write an app which must logon to a secure site using VPN and then reset certain PC logon sessions as required, this will be sent to the app via email.

I am starting at he Logn to the secure site but I am already having problems here. Try as I may, I am unable to automate this.

Here is some of my source code:

#include <IE.au3>
If Not WinExists("Authception Login Page", "" ) _
    Then _OpenBrowser()

Func _OpenBrowser()
    $oIE = ShellExecute ("iexplore.exe", "https://172.20.200.46/Authception/")
    _WinWaitActivate("Security Alert", "Information" )
    ControlClick("Security Alert", "Information you exchange", "Button1")
    _WinWaitActivate("Authception Login Page - Microsoft Internet Explorer", "https://172.20.200.46/Authception/" )
EndFunc

_WinWaitActivate("Authception Login Page", "" )

ControlClick("Authception Login Page", "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", 100, 115)
MouseClick("Primary", 100, 115)
Send("LogonID")
ControlClick("Authception Login Page", "", "[Class:IEFrame]", 100, 145)
MouseClick("Primary", 100, 145)
Send("Password")
ControlClick("Authception Login Page", "", "[Class:Internet Explorer_Server]", 50, 170)
MouseClick("Primary", 50, 170)

Func _WinWaitActivate($title,$text,$timeout=0)
    WinWait($title,$text,$timeout)
    If Not WinActive($title,$text) Then WinActivate($title,$text)
    WinWaitActive($title,$text,$timeout)
EndFunc

I have tried to attach the source code of the logon page but I am unable to attach this as a text file, it under 4KB.

Can someone please assist me or give me some directions on how to logon to this site?

Gerry

Share this post


Link to post
Share on other sites
Bert

Why are you using IE.au3 if you are not using any commands provided by it? I suggest you reread the IE section of the help file. It will answer all your questions, and by using it you can remove all the control clicks and win... when dealing with the IE window.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.