jerryHu Posted July 24, 2018 Posted July 24, 2018 I tried many ways _IETagnameGetCollection _IELinkClickByText all are failures checked a lot of methods and there is no one. Please help i need click "B456" html <div class="menu"> <ul id="menuUl"><li class="">a123</li><li>a456</li><li>b123</li><li>b456</li><li>c123</li><li id="webMassage" class="on">站内消息</li><li class="nb">安全退出</li></ul> </div> </div>
jerryHu Posted July 24, 2018 Author Posted July 24, 2018 For $i = 0 To 50 $otest = _IEGetObjById($oIE, "menuUl") ;~ $otestclick = _IEFormGetCollection($otest) $otestclick = _IELinkGetCollection($otest,$i) MsgBox(0,0,$otestclick) $otestclick.click MsgBox(0, 0, $i) Next $otest object has also tried $oie
jerryHu Posted July 24, 2018 Author Posted July 24, 2018 (edited) I have tried several ways $oInputs2 = _IETagNameGetCollection($oIE, "button") For $oInput2 In $oInputs2 If $oInput2.type = "button" And $oInput2.value = "b456" Then _IEAction($oInput2, "click") Sleep(500) EndIf Next i also have one question Is this because I am not familiar with css? or autoit? Edited July 24, 2018 by jerryHu
Juvigy Posted July 25, 2018 Posted July 25, 2018 Try this one and show us the output: $otest = _IEGetObjById($oIE, "menuUl") ConsoleWrite($otest.innerhtml&@CRLF)
jerryHu Posted July 25, 2018 Author Posted July 25, 2018 0069: 0-0: ConsoleWrite($otest.innerhtml&@CRLF) <li>A123</li><li>A456</li><li>B123</li><li>B456</li><li>C123</li><li class="on" id="webMassage">站?消息</li><li class="nb">安全退出</li>
jerryHu Posted July 25, 2018 Author Posted July 25, 2018 (edited) "A123|ReportSearch/ReportNew.aspx", "A456|ReportSearch/Report.aspx" ] }, "B123": { "ut": [ "B456|/teryPeriod/Historytery.aspx" ] }, "C123": { "ut": [ "站内消息|/NewsManage/NewsList.aspx" ] }, "安全退出": { "ut": [ "Quit.aspx" ] }} <script language="javascript" I found this from the source code. I tried to add ReportSearch/Report.aspx to the URL to display an illegal path. Edited July 25, 2018 by jerryHu
jerryHu Posted July 25, 2018 Author Posted July 25, 2018 Exciting, I solved it. $objs = _IETagnameGetCollection ($oIE ,"li") For $obj In $objs If $obj.innertext == 'B456' then _IEAction($obj,"click") ExitLoop EndIf Next
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