Suji Posted September 6, 2018 Share Posted September 6, 2018 How to get </li> elements on IE... Can anyone give hint on this? Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted September 6, 2018 Share Posted September 6, 2018 Hi @Suji, and welcome to the AutoIt forum Take a look at _IETagNameGetCollection() in the Help file Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Suji Posted September 6, 2018 Author Share Posted September 6, 2018 Thanks for the warm welcome!!!!! #include <IE.au3> $oIE = _IEAttach("http://sqms/Dashboard/AssociateSelectionForEval.aspx?Mode=TGlzdEFzc29jaWF0ZUZvckNvYWNoaW5nRW50cnk=", "URL") Winactivate("SQMS - Coach - Internet Explorer","") $oForm = _IEFormGetObjByName($oIE, "form1") $oInputs = _IETagNameGetCollection($oIE, "li") For $oInput in $oInputs If $oInput.ClassName = "con-col2" And $oInput.InnerText = "351755" Then $oInput.Click ExitLoop EndIf Next Didnt help. @FrancescoDiMuro Link to comment Share on other sites More sharing options...
Suji Posted September 6, 2018 Author Share Posted September 6, 2018 Additional info: <li class="con-col2">371532</li => i have many employee IDs and need to fetch one by one.. it has same class name for all emp IDs Link to comment Share on other sites More sharing options...
AutoBert Posted September 6, 2018 Share Posted September 6, 2018 If your employees are in a link-collection, use _IELinkGetCollection and _IENavigate. Link to comment Share on other sites More sharing options...
Suji Posted September 6, 2018 Author Share Posted September 6, 2018 $oIE = _IEAttach("http://sqms/Dashboard/AssociateSelectionForEval.aspx?Mode=TGlzdEFzc29jaWF0ZUZvckNvYWNoaW5nRW50cnk=", "URL") Winactivate("SQMS - Coach - Internet Explorer","") Local $sMyString = "351755" Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks Local $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then _IEAction($oLink, "click") ExitLoop EndIf Next Can u help with example?.... for _IELinkGetCollection to fetch the employee ID from "<li class="con-col2">371532</li" 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