Get HTTP Status from InternetExplorer Com Object

Welcome Forums General PowerShell Q&A Get HTTP Status from InternetExplorer Com Object

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
2 years, 11 months ago.

  • Author
    Posts
  • #37932

    Participant
    Points: 0
    Rank: Member

    I am struggling to get Status of page that I am trying to get using InternetExplorer COM objects method Navigate.

    I found that there is event NavigateError and have saw some overrides examples for VBS (http://www.visualbasicscript.com/VBS-Connect-to-website-to-check-active-m68559.aspx) and for Perl (http://www.codegithub.com/watch?v=0iiJyUPXQeqW) but how to override this method in IE???

    Here sample code :

    $ie = New-Object -comobject InternetExplorer.Application
    $ie.visible = $true
    $ie.Navigate($URL)
    while( $ie.busy){Start-Sleep 1}

    Because of Complex Login logic(adfs, JavaScript redirect..) I can't use any of other nicer approaches like Invoke-WebRequest, HTTPRequest, WebClient or simillar.

  • #37935

    Participant
    Points: -19
    Rank: Member

    Look for Invoke-WebRequest as an alternate way, unless you really the COM object.

The topic ‘Get HTTP Status from InternetExplorer Com Object’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort