Rodia2000

IE search tag content <p></p>

5 posts in this topic

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>

Share this post


Link to post
Share on other sites



#3 ·  Posted

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

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

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

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now