Rodia2000 Posted February 28, 2017 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>
Subz Posted February 28, 2017 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
Rodia2000 Posted March 1, 2017 Author 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
Rodia2000 Posted March 1, 2017 Author 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
jdelaney Posted March 2, 2017 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.
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