Jump to content

_IENavigate


DW1
 Share

Recommended Posts

There is an internal https site here at work and I would like to put it in an embedded IE.

All went well for the http: site (internal and external) but when I try to connect to this https: site it is acting like it cannot display the page.

Is there a way around this?

The address would do no good as this is internal only.

if I type it into firefox or IE, they both want you to accept a cert and allow the site to display, in the embedded I get no such auth.

PLEASE help.

Link to comment
Share on other sites

I did and I still cannot get to this page, but only in the IE object. it opens in IE fine, just not an IE object.

This works fine for me at work (Citrix server login with CAC certificate required):

#include <IE.au3>
$URL = "https://192.168.0.10/Citrix/MetaFrameXP/default/login.asp?NFuse_LogoutId=On"
$oIE = _IECreate($URL, 0, 1, 0) ; Don't wait for load
$UserName = "first.last.name"
If IsObj($oIE) Then
    If WinWaitActive("Choose a digital certificate", "Certificates List", 30) Then
        ControlClick("Choose a digital certificate", "Certificates List", "Button2") ; OK
        Sleep(500)
        _IELoadWait($oIE)
        
        ; Get form objects for login page
        $oForm = _IEFormGetCollection($oIE, 0)
        $oUserName = _IEFormElementGetObjByName($oForm, "user")
        $oPassword = _IEFormElementGetObjByName($oForm, "password")
        If IsObj($oUserName) And IsObj($oPassword) Then
            ; Input user name and wait for password
            _IEFormElementSetValue($oUserName, $UserName)
            Sleep(500)
            _IEAction($oPassword, "focus")
            
            ; Wait for page to change
            Do
                Sleep(250)
            Until Not IsObj(_IEFormElementGetObjByName($oForm, "password"))
            Sleep(500)
            _IELoadWait($oIE)
            
            ; Get frame of port page
            $colFrames = _IEFrameGetCollection($oIE)
            $i = 0
            For $oFrame In $colFrames
                ConsoleWrite($i & ":  " & $oFrame.name & @LF)
            Next
        Else
            MsgBox(16, "Error", "Failed to get objects for UserName and Password inputs.")
        EndIf
    Else
        MsgBox(16, "Error", "Dialog for choosing digital certificate did not open before timeout.")
    EndIf
Else
    MsgBox(16, "Error", "Failed to open IE to NMCI Portal longin page.")
EndIf

:)

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

thank you, this works ok in IE, but not if it is embedded

Well, an embedded ActiveX IE Control is not the same thing as a full instance of IE. There are other things known to not be available from an embedded IE control (some are listed in the help file under _IECreateEmbedded), I guess that's one of them.

:)

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

I'm guessing this issue is not unique to embedded IE with AutoIt. You'll find discussion of embedding IE with VB and other languages in MS forums and MSDN. Suggest you do some searching and report back...

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Will, do, everything works fine in IE. Just not embedded

The funny thing is that a

If _IEPropertyGet($oIE, "locationname") = "LicAdminTool Login Page" Then

passes, as well as a _IEPropertyGet($oIE, "locationurl") test.

Very weird, the only thing that will not come through is the freaking page LOL.

Also, I installed the cert on this PC just incase that was an issue. still fails

Link to comment
Share on other sites

Will, do, everything works fine in IE. Just not embedded

The funny thing is that a

If _IEPropertyGet($oIE, "locationname") = "LicAdminTool Login Page" Then

passes, as well as a _IEPropertyGet($oIE, "locationurl") test.

Very weird, the only thing that will not come through is the freaking page LOL.

Also, I installed the cert on this PC just incase that was an issue. still fails

Does the pop for the certificate come up? Because I wouldn't expect a secure page to finish loading until you dealt with the pop up to pick a cert and authenticate. Maybe there is an issue with an embedded IE being able to kick pop ups, like the cert selection? Note in my code above, it does not look for _IELoadWait until after the regular windows GUI for pop up is dealt with.

:)

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

nope, no promt for the cert. That is why (i had the same thought as you) I installed the cert to the machine, thinking I just wasn't getting asked for permision to use it.

Still no luck. now IE will not ask for it either but the embedded still will not display a page.

Yet locationname and locationurl check out ok...

I am sooooo confused. Well I guess this one is going to have to be called in a seperate (real) IE window

Link to comment
Share on other sites

To help with your searching, when IE is embedded it is called a "webbrowser" control.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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...