Sign in to follow this  
Followers 0
UNO

Cant playback script when it encounters a Security Certificate

16 posts in this topic

I tried to record a sequence of actions when using a secure intranet site.

I recorded the code from Au3.Record .The following is the script generated.

However it does not play back correctly

I have encountered this error when a site also uses javascript alert function(to pop up a message) as it cant send the keys and it pauses.

$oIE = _IECreate ("https://XYZ.com",0,1,1,0)

;Intranet site so removing the URL

WinWait("Security Alert","Information you exch")

If Not WinActive("Security Alert","Information you exch") Then WinActivate("Security Alert","Information you exch")

WinWaitActive("Security Alert","Information you exch")

Send("{SHIFTDOWN}{TAB}{SHIFTUP}{SPACE}")

Also attaching the screenshot of the dialog screen where my script pauses.

Any ideas on how to make this work?

Thanks in advance....

post-20070-1174052740_thumb.jpg

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Try this.. Read with Autoit Info Tool the class or id of the yes button and insert it in the right place :whistle:

$oIE = _IECreate ("https://XYZ.com",0,1,1,0)
While _IEPropertyGet($oIE, "busy")
    If WinExists("Security Alert") Then
        ControlClick("Security Alert", "", "GET YES BUTTON INFO")
    EndIf
WEnd
Edited by Shevilie

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

post-20070-1174056724_thumb.jpgThanks Shevilie,b ut it didnt workout

Posting the image of A3Info tool on the yes button

Edited by UNO

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

$oIE = _IECreate ("https://XYZ.com",0,1,1,0)
While _IEPropertyGet($oIE, "busy")
    If WinExists("Security Alert") Then
        ControlClick("Security Alert", "", "Button1")
    EndIf
WEnd

Edited by Shevilie

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Shevile,

It not working out too.

Can any other ideas work out?

Thanks

Share this post


Link to post
Share on other sites

Shevile,

It not working out too.

Can any other ideas work out?

Thanks

Just a wild guess...

Im not sure...

Send ALT + Y

Cheers


Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
Share on other sites

As I understand it, you enter the page and during the loadtime this windows pops up..

$oIE = _IECreate ("https://XYZ.com",0,1,1,0)

WinWait("Security")

MsgBox(0,0,"Found Window")

ControlFocus("Security", "", "Button1")

ControlClick("Security", "", "Button1")


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Shevile,

It not working out too.

I believe AutoIT cant catch the popup in IE

Any ideas?

Share this post


Link to post
Share on other sites

Does the MsgBox apear ?? Or have you messed with advanced title settings ??


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

no the message box doesnt appears.it just pauses

For the time being i am using the following code with a long delay.

If WinActive("Security Alert","Information you exch")Then

Send("{ENTER}")

EndIf

But some PCs here have imported the above mentioned certificate.So the security certificate may or may not appear.

Share this post


Link to post
Share on other sites

Well Then this should work

$oIE = _IECreate ("https://XYZ.com",0,1,1,0)
While _IEPropertyGet($oIE, "busy")
    If WinExists("Security Alert","Information you exch") Then
        ControlClick("Security Alert","Information you exch", "Button1")
    EndIf
WEndoÝ÷ ØÍ¢Ûaz{kÊÚ+º|¨º·(u맶)b¶®±ë-éð)^Ê«±Êâ¦Ø¬©àx+º{(u殶­sdbväW7G2gV÷Cµ6V7W&GÆW'BgV÷C²ÂgV÷C´æf÷&ÖFöâ÷RW6gV÷C²FVà¢×6t&÷gV÷CµvæF÷rW7G2gV÷C²¢b33c·BÒ6öçG&öÄ6Æ6²gV÷Cµ6V7W&GÆW'BgV÷C²ÂgV÷C´æf÷&ÖFöâ÷RW6gV÷C²ÂgV÷C´'WGFöãgV÷C²¢bb33c·BFVà¢×6t&÷gV÷C´6Æ6¶VB'WGFöâgV÷C²¢VÇ6P¢×6t&÷gV÷C´6÷VÆFâb33·B6Æ6²'WGFöâgV÷C²¢VæD`¤VæD

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

not yet working.

has AutoIT has some issues with catching controls in pop-ups.

For example

1)i tried to play in IE7 but the msgbox didnt appear

2)also use the alert function of java and it struggle to send the right key combination

i am using the below code with a long delay(not a good approach)

If WinActive("Security Alert","Information you exch")Then

Send("{ENTER}")

EndIf

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Well did you ran the last code when your script is pausing at the popup ?? And wait did it return ?? Did any MsgBox popup ??

Edited by Shevilie

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

$oIE = _IECreate ("https://XYZ.com",0,1,1,0)

;Intranet site so removing the URL

WinWait("Security Alert","Information you exch")

If Not WinActive("Security Alert","Information you exch") Then WinActivate("Security Alert","Information you exch")

WinWaitActive("Security Alert","Information you exch")

Send("{SHIFTDOWN}{TAB}{SHIFTUP}{SPACE}")

The problem in is in the _IECreate function call. The fourth param is $f_wait and it should be set to 0:

$oIE = _IECreate("https://XYZ.com",0,1,0,0)

WinWait("Security Alert")

Send("Y")

With the $f_wait set to 1, it's waiting for IE to load the XYZ.com site before continuing. The security window is preventing the site from loading, so _IECreate never returns.

Hope this helps,

Larry

Share this post


Link to post
Share on other sites

Argh my bad... I was sure that it was number 4 that was wait :P Well thats the problem :whistle:


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

This post helped me figure out how to respond to a server request for a client certificate. Thanks.

I needed to respond to the request and then have the script continue to fill in the form and navigate through the site.

My script:

$oIE = _IECreate()

_IENavigate($oIE, "https://www.securesite.com", 0)

WinWait("Choose a digital certificate", "", 7)

Sleep(500)

; chooses first cert on the list

ControlClick("Choose a digital certificate", "", "[iD:1]")

Sleep(500)

WinWaitActive("Login Screen")

; maximize window

SEND("!{SPACE}x")

Sleep(1500)

; get pointers to the login form and username and password fields

$o_form = _IEFormGetObjByName($oIE, "Login")

$o_ClientID = _IEFormElementGetObjByName($o_form, "ClientID")

$o_UserID = _IEFormElementGetObjByName($o_form, "UserID")

$o_Password = _IEFormElementGetObjByName($o_form, "Password")

; Set field values and submit the form

_IEFormElementSetValue($o_ClientID, "MyClientID")

_IEFormElementSetValue($o_UserID, "MyUserID")

_IEFormElementSetValue($o_Password, "MyPassword")

;submit form - need this for my site

SEND("{TAB}")

SEND("{TAB}")

SEND("{TAB}")

SEND("{SPACE}")

_IELoadWait($oIE)

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  
Followers 0