0

Working on a program that keeps track of a users details. I found a site that gives me information but cannot seem to automate clicking the hyperlink that copies info to my clipboard. Here is what I get from inspect element:

<a href="#" class="right hide-on-small-only" id="copy_inventory" data-clipboard-text="RandomLaw's stats:THIS IS WHERE THE TARGET INFO IS DISPLAYED
For Each Element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("right hide-on-small")
        If Element.OuterHtml.Contains("copy_inventory") Then
            Element.InvokeMember("click")

RandomLaw being the username, "stats" being constant. I have been using webBrowser1 but have no need for the window to be seen if there is a better method. No matter what I do I can only return the hypertext "Copy"

Here is the website - Notice the "Copy" is what I cant click

  • 1
    Take a look at this, it may help: http://stackoverflow.com/questions/22581345/click-button-copy-to-clipboard-using-jquery – Letícia Rezende Feb 12 '17 at 07:52
  • Why bother with the clipboard at all? You have the web page, just grab the `data-clipboard-text` attribute directly. (`Element.GetAttribute("data-clipboard-text")`) – theB Feb 12 '17 at 12:59

0 Answers0