PINTO1927 Posted April 15, 2022 Share Posted April 15, 2022 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". 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 More sharing options...
Nine Posted April 15, 2022 Share Posted April 15, 2022 Inside the loop, put some ConsoleWrite (inside and outside the If statement), so you know if all goes well or not. Try with tag <a> instead of <div>. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
PINTO1927 Posted April 22, 2022 Author Share Posted April 22, 2022 unfortunately, even with the <a> tag it doesn't work ... does it seem to give me an example? Link to comment Share on other sites More sharing options...
SkysLastChance Posted April 22, 2022 Share Posted April 22, 2022 (edited) 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 April 22, 2022 by SkysLastChance You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now