Search on an Internet Explorer App Object
Asked Answered
R

2

14

I have a InternetExplorer.Application

I am creating an automation and one of the pages I opened, opened a dialog that looks like a new tab, but on the same process (I checked it by the task manager >> process tab that the same process just consumes more RAM) and I don't find the document if that dialog application.

Even in the shell.application In the windows it isn't there.

I want help to find it

I thought to do some recursion on the $ie members to find a word that appears there and if it find a path post that path.

Thank you in advance

Ritz answered 6/1, 2016 at 19:39 Comment(11)
is this an iframe? can you physically see the window?Doubs
I can see the window but its not under $Ie.document.frames its looks like a new windows but somehow it prompt windowRitz
if you run this: $ie.Document.getElementsByTagName('iframe') you get anything?Doubs
Nope it not found anything. already try requrcsion function but still nothing.Ritz
is there any chance my InternetExplorer need credentials for that web?Ritz
You can help me? Any other ideas please?Ritz
Can you give the url to trproduce the problem ?Conspectus
i cant give it, it's inside company web.Ritz
Can you give any more info on this? I had some problems with IE and powershell before that magically vanished when I have updated Office...Hospitalization
Is it a prompt from javascript? Are you able to inspect the element?Cooky
It's hard to tell what's the problem here. Can you add some code to allow others to reproduce the issue?Fresh
T
1

It sounds like the dialog box is a form within the same IE instance. It would be a document element.

$ie.document.documentelement.all | foreach {$DE = $_ ; $DE | where {$_.innerhtml -match "My search arguement"}| foreach{$DE|select uniqueID}}

Once you identify the uniqueID then you can use $ie.Document.getElementById('ms__id14')

Toughminded answered 5/7, 2019 at 17:40 Comment(0)
H
0

It's a long shot but since it is in a company intranet, many times is can be a dialog telling you that you have SSL Certificate Error. It may be visible or not based on (wrongly?) enforced policies on your machine by the company. You might try to bypass it using this after navigating to the problematic URL:

    if ($ie.document.url -Match "invalidcert") {
        $bypass_link = $ie.Document.getElementsByTagName("a") | where-object {$_.id -eq "overridelink"}
        $bypass_link.click()
        while ($ie.ReadyState -ne 4) {
            start-sleep -m 100
        }
        "Done!"
    };
Hospitalization answered 7/8, 2016 at 19:42 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.