<div class="add_friend blue_button">Нажать</div> 

Dear, tell me how to click on the diva?

 lnks := (WebBrowser1.Document as IHTMLDocument2).links; for i := 0 to lnks.length - 1 do begin lnk := lnks.item(varEmpty, OleVariant(i)) as IHTMLElement; if lnk.className = 'add_friend' then begin lnk.click; end; end; 

This code is missing from sight.

    1 answer 1

    class add_friend blue_button

    and not as you have in the condition

    lnk.className = 'add_friend'

    • Ignore anyway. - RImon
    • Try to output all lnk.className values ​​to your div in a frame and you don’t get it at all with this code. I checked your DIV'a class is add_friend blue_button on si sharpe, but here it’s not critical I think return a_tag.className; - NMD