Rodia2000

IE search tag content <span class="price" id=...></span>

3 posts in this topic

#1 ·  Posted

Hi, I already read span tag but I have many products into the page, I already know 3445 is a product and it can be a part of variable, but I don´t know how can I read an:

 

Span with class "price" and id "product-price-3445" and get the price 3,753

 

Regards!!!

<span class="price" id="product-price-3445">
                    $3,753                </span>
Local $oPTags_Prod = _IETagNameGetCollection($oIE, "span")
   For $oPTag In $opTags_Prod
      If $oPTag.ClassName = 'price' Then
         ConsoleWrite($oPTag.InnerText & @CRLF)
      EndIf
   Next

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

??

If $oPTag.ClassName = 'price' And $oPTag.ID = 'product-price-3445' Then

edit:

also, since an ID is "unique" within an html page maybe filtering only on the ID will suffice

If $oPTag.ID = 'product-price-3445' Then

 

Edited by Chimp
1 person likes this

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

#3 ·  Posted

It works, thanks a lot.

 

Best regards!!!

 

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