IE REQUESTING A CERTIFICATE

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
eg252
Newbie
Posts: 11
Joined: Thu Dec 02, 2004 5:32 pm

IE REQUESTING A CERTIFICATE

Post by eg252 » Tue Dec 14, 2004 8:08 pm

WHEN I TRY TO ACCESS A WEBSITE (HTTPS://XNET.BLUENILE.COM) THEIR SITE REQUIRES A CERTIFICATE. I MUST CHOOSE THE CERTIFICATE TO SEND. ( I ONLY HAVE ONE CERTIFICATE). THE PROBLEM IS THAT I CANNOT SET THE FOCUS TO THAT DIALOG, I JUST SEND AN ENTER - AND IT PRESSES THE ENTER IN THE WRONG WINDOW.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Dec 14, 2004 8:22 pm

This seems to work ok:


VBSTART
Dim IE
Sub CreateIE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
End Sub

Sub OpenPage(URL,Wait)
IE.navigate URL
do while IE.Busy and Wait
loop
End Sub

Sub WaitBusy
do while IE.Busy
loop
End Sub
VBEND

Let>URL=HTTPS://XNET.BLUENILE.COM
VBRun>CreateIE
VBRun>OpenPage,%URL%,0
WaitWindowOpen>Security Alert
Press ALT
Send>y
Release ALT
WaitWindowOpen>Choose a digital certificate
Press Enter
VBRun>WaitBusy
MessageModal>Done
MJT Net Support
[email protected]

eg252
Newbie
Posts: 11
Joined: Thu Dec 02, 2004 5:32 pm

thank you

Post by eg252 » Wed Dec 15, 2004 4:22 pm

yes it worked

eg252
Newbie
Posts: 11
Joined: Thu Dec 02, 2004 5:32 pm

the dialog is not recognized as a window

Post by eg252 » Wed Dec 15, 2004 7:21 pm

the client authentication window is a dialog. it is part of the original ie window. how do i make sure that the dialog window is the one the enter is reaching?
sometimes it works and sometimes not.

eg252
Newbie
Posts: 11
Joined: Thu Dec 02, 2004 5:32 pm

i tried this trick, but it also does not work.

Post by eg252 » Wed Dec 15, 2004 7:57 pm

i saw this and tried it, but this doesn't work either. when i watch the macro it works, but when i let it work in the background the enter still goes to the wrong window

Let>WIN_USEHANDLE=1
GetActiveWindow>old_window,x,y
Label>waitforchange_3
GetActiveWindow>window_handle,X,Y
If>window_handle=old_window,waitforchange_3
Let>justopened_3=window_handle
SetFocus>window_handle

Press Enter

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed Dec 15, 2004 8:30 pm

Use SetFocus. It worked for me. See the script posted previously.
MJT Net Support
[email protected]

eg252
Newbie
Posts: 11
Joined: Thu Dec 02, 2004 5:32 pm

i tried that

Post by eg252 » Wed Dec 15, 2004 8:35 pm

please look at my previous post. the set focus must be happening and before the enter the focus must be changing.
also i am not being notified by email when a post replies.

eg252
Newbie
Posts: 11
Joined: Thu Dec 02, 2004 5:32 pm

i found an answer!!

Post by eg252 » Wed Dec 15, 2004 8:59 pm

there is an option in ie in security, custom level, miscellaneous to don't prompt for client certificate selection when there is only one available. This makes that the dialog box should not come up!!

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed Dec 15, 2004 9:01 pm

That would certainly make life easier. I'm not sure why it failed for you though as I had no problem focusing that dialog.

BTW - to be notified when someone replies to your post you need to ensure that 'Notify me when a reply is posted' is checked when submit your post. If it still fails it could be a mail server problem - I'll check our mail server logs to see if there are any problems sending to your email address.
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts