Jump to content

Waiting for an IE pop up using IETagName?


Recommended Posts

I am trying to wait for a pop up in IE with the title of "filed". I believe it is in a IE-frame.  I am not having any luck attaching to it. The best thing I have been able to do is find the title using the below code. 

Is there a way I can just make AutoIt wait until it finds the  "Filed" value from the below code?

Thank you for any help, I am probably making this harder then it really is. 

$oIE = _IEAttach("Meditech")


$oInputs1 = _IETagNameGetCollection($oIE, "div")
   For  $oInput1 in $oInputs1
   If StringStripWS($oInput1.innertext,1) = "Filed" Then
     $target = $oInput1
      ExitLoop
   Else
      $target = "NOT FOUND"
   EndIf
Next

I have tried different variations of

_IEAttach("MEDITECH","Filed")


WinWaitActive("MEDITECH", "Filed")

Here is what the popup looks like.

example.PNG.793dab4e7ed63d65daf5db9b211644aa.PNG

Edited by SkysLastChance
adding more detail

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

"The best thing I have been able to do is find the title using the below code."

Are you sure that you are getting the title from the popup or from the page behind?  To me it looks like Java popup, you'll need to figure out the type of popup is so that you can detect the popup see:

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/popups-and-dialogs.html

Link to comment
Share on other sites

Hey Subz,

Thank you for the response, I know it is not from the page behind. When the popup is not there and I run the script I get the "NOT FOUND." prompt. 

5c474850e306b_reinstateexample.thumb.PNG.1998a832038bb9ccb9fcdaa26df982de.PNG

This seems to be working for the time being. However, I know it is not ideal. 

Do
   $oIE = _IEAttach("Meditech")

   Sleep (5000)

   $oInputs1 = _IETagNameGetCollection($oIE, "div")
   For  $oInput1 in $oInputs1
   If StringStripWS($oInput1.innertext,1) = "Reinstate selected accounts?" Then
     $target = $oInput1
      ExitLoop
   Else
      $target = "NOT FOUND"
   EndIf
Next

Until $target <> "NOT FOUND"

 

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

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

×
×
  • Create New...