Jump to content
SkysLastChance

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

Life's simple. You make choices and you don't look back.

Share this post


Link to post
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

Share this post


Link to post
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"

 


Life's simple. You make choices and you don't look back.

Share this post


Link to post
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

  • Similar Content

    • By moimon
      Hi all. 
      Sorry if my words are confusing because I am not good at English.
      I am writing code to embed website with Recaptcha in GUI. And then, the code will automatically press the "I'm not a robot" button. The problem here is:
         - The code still works fine when entering iFrame to interact with Recaptcha with the URL is "https://www.google.com/recaptcha/api2/demo"
      <snip>
       
         - But for other URLs (such as "https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php"), the code cannot be entered into the iframe.
       
      Code:
      <snip>  
      I did a lot of research but didn't know why.
       I sincerely thanks for the help. 
    • By SkysLastChance
      I am pretty sure the site that I am using was updated and now I am not seeing the same tags/elements that I used to. I tried using a UIAspy to see if I could grab them that way with no luck. 
      What do I need to do to be able to automate this again. Are the elements hidden somewhere?
      Instead of highlighting established account is highlights all of the web page almost. How can I get to the detail again? 
      I used to grab establish account by the name. Now I have nothing to even try to grab. 
      There are not elements in the event viewer either. 
       


       
      This is what happens when I try to inspect the element and click established account. 
      I get the same type of results in chrome
    • By yffulf
      Is there probably a way to click ie popup button and hide or invisible popup button in the same time?
      I try to use WinSetState @SW_hide ,
      the result is ie crashing or no response because button hide and the next click command won't work...
      $oForm=_IEFormGetObjByName($oIE,"form1") $obutton=_IEFormElementGetObjByName($oForm,"btn_OK") $hWnd = _IEPropertyGet($oIE, "hwnd") _IEAction($obutton,"focus") ControlSend($hWnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") WinWait("", "確定存檔嗎?") WinSetState("","確定存檔嗎?",@SW_Hide) ControlClick("", "確定存檔嗎?", "[CLASS:Button; TEXT:確定; Instance:1;]")  
    • By _leo_
      Hey there!
      I am having a problem with clicking a button in IE. As you can see in the code, there would be a class name to click it, but since this button exists several times with exactly the same code, I can only use the "Noch nicht veröffentlicht" to separate it from the others. But this part is just pure text without any classification. 
      "<div class="checkmark" data-v-1e5b1f70=""><svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 16 16" data-v-1e5b1f70=""><circle cx="8" cy="8" r="8" data-v-1e5b1f70="" /></svg></div>Noch nicht veröffentlicht"
      I was trying to click it with:
      #include <IE.au3> local $oNNVs = _IEFormGetCollection($oIE2) For $oNNV in $oNNVs If String($oNNV.innertext) = "Noch nicht veröffentlicht" Then _IEAction($oNNV, "click") EndIf Next and:
      $inputs = $oIE2.document.getElementsByTagName("div") For $input In $inputs If $input.innertext == "Noch nicht veröffentlicht" then $input.click() EndIf Next But nothing seems to work. Thanks for the help!
    • By TXTechie
      Hello Everyone,
      I'm looking for a way to use an already open Internet Explorer (IE) window (if one is up and running) and then navigate to a new URL in a new IE tab.
      I thought that _IECreate would easily meet my needs. However, when I use the following script:
      #include <IE.au3> Local $oIE = _IECreate("https://" & $Server & ":8444/", 1, 1, 0, 1) ...with one or more open IE windows, it still opens yet a new IE window.
      Are there any other ideas for how to reliably use an already open IE windows and then how to open a new tab in IE to navigate to a new URL?
      Regards,
      TX Techie
×
×
  • Create New...