Suji Posted September 6, 2018 Posted September 6, 2018 How to get </li> elements on IE... Can anyone give hint on this?
FrancescoDiMuro Posted September 6, 2018 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
Suji Posted September 6, 2018 Author 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
Suji Posted September 6, 2018 Author 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
AutoBert Posted September 6, 2018 Posted September 6, 2018 If your employees are in a link-collection, use _IELinkGetCollection and _IENavigate.
Suji Posted September 6, 2018 Author 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"
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