1

I tried to extract somes information from ALibaba.com but i didn't success to select Supplier in the list

Here is the html code

 Set Post = IEdoc_ALi.getElementsByClassName("ui-searchbar-type-option").Item
 Post.all(2).innerText = "Suppliers"

Thanks in advance

1 Answer 1

1

It's a link that needs clicking. You can use a css attribute = value selector to target the relevant node and then apply the click method.

Option Explicit   

Public Sub SelectSuppliers()   
    Dim ie As SHDocVw.InternetExplorer

    Set ie = New SHDocVw.InternetExplorer

    With ie
        .Visible = True
        .Navigate2 "https://www.alibaba.com/"
        While .Busy Or .readyState <> 4: DoEvents: Wend
        .document.querySelector("[data-value=suppliers]").Click

        Stop '<Delete me later
    End With
End Sub
Sign up to request clarification or add additional context in comments.

1 Comment

Accepted. As this is going to help me do something I was planning (with a different wbsite that is)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.