Jump to content

How to manage two IE pages


Recommended Posts


Hi everyone,
I have problems managing some IE pages.


The first page I create shows another page that unfortunately I can't manage.

$IE = _IECreate("http://sapgfp.rete.pste:8020/irj/portal")
_IELoadWait($IE)

$oButtons = _IETagNameGetCollection($IE, "input")
For $oButton In $oButtons
    If String($oButton.value) = "Eseguire logon" Then
        _IEAction($oButton, "click")
        ExitLoop
    EndIf
Next
_IEQuit($IE)

_WinWaitActivate("NFA Pose Portal - Internet Explorer","")
$IE2 = _IEAttach("NFA Pose Portal")
_IELoadWait($IE2)

On the second page I should be able to click on the "I miei Ticket".

image.png.57305d1f712214b97ae4608930c04c1f.png

I was trying to find a solution by running this code:

$oDivs = _IETagNameGetCollection($IE2, "div")
For $oDiv In $oDivs
  If StringInStr($oDiv.classname, "criteri-ricerca-buttons") and $oDiv.innertext = "I miei Ticket" Then
     _IEAction($oDiv, "click")
  EndIf
Next

But unfortunately I don't get any results or errors.

 

Can you help me?

 

 

Thanks

 

 

 

 

Link to comment
Share on other sites

Link to comment
Share on other sites

How about this?

Local $oBs = _IETagNameGetCollection($IE2, "b")
For $oB In $oBs
    If StringStripWS($oB.innertext, 7) = "I miei Ticket" Then
        _IEAction($oB, "click")
        ExitLoop
    EndIf
Next

You can try this also to view all the b tag inner text. 

$sTxt = ""
Local $oBs = _IETagNameGetCollection($IE2, "b")
For $oB In $oBs
    $sTxt &= $oB.innertext & @CRLF
Next
MsgBox($MB_SYSTEMMODAL, "B tag", "B-Tag List: " & $oBs & @CRLF & @CRLF & $sTxt)

 

Edited by SkysLastChance

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...