Rodia2000 Posted February 28, 2017 Share Posted February 28, 2017 Hi, I already open IE, put user and password, to confirm I login, I need validate this tag with my name, does anyone known how can do this? Regards!!! <p class="welcome-msg"> SOCIO: Bienvenido, andres lopez! </p> Link to comment Share on other sites More sharing options...
Subz Posted February 28, 2017 Share Posted February 28, 2017 You can try something like: Local $oPTags = _IETagNameGetCollection($oIE, "p") For $oPTag In $opTags If $oPTag.ClassName = 'welcome-msg' Then MsgBox(64, 'Welcome', $op.InnerText) Next Link to comment Share on other sites More sharing options...
Rodia2000 Posted March 1, 2017 Author Share Posted March 1, 2017 It works, thanks a lot. Local $oPTags = _IETagNameGetCollection($oIE, "p") For $oPTag In $opTags If $oPTag.ClassName = 'welcome-msg' Then $sStr1 = "SOCIO: Bienvenido, andres lopez! " $sStr2 = $oPTag.InnerText $iCmp = StringCompare($sStr1, $sStr2) EndIf Next Link to comment Share on other sites More sharing options...
Rodia2000 Posted March 1, 2017 Author Share Posted March 1, 2017 Local $oPTags = _IETagNameGetCollection($oIE, "p") For $oPTag In $opTags If $oPTag.ClassName = 'welcome-msg' Then $sStr1 = "SOCIO: Bienvenido, andres lopez! " $sStr2 = $oPTag.InnerText $iCmp = StringCompare($sStr1, $sStr2) EndIf Next Link to comment Share on other sites More sharing options...
jdelaney Posted March 2, 2017 Share Posted March 2, 2017 (edited) You can use my signature...the xpath would look like: $xpath = "//p[@class='welcome-msg' and contains(.,'andres lopez')]" The function will do the rest, and return an array of all matching data. Edited March 2, 2017 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. 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