Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27201

Need help clicking button without id

$
0
0
Hello people ive tried multiple ways of trying to click a button without and id code is below
button code:
Code:

<button style="padding: 5px 10px; font-size: 1.5em;" class=" fk-uix-button yt-uix-button-primary fk-uix-button-size-default" onclick="_gel('autoLinkForm').submit();this.disabled=true;;return false;" type="button" role="button">    <span class="fk-uix-button-content">
Link
    </span>
</button>

on of many codes i have tried:
Code:

For Each Element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("button")
  If Element.InnerText.Contains(" fk-uix-button yt-uix-button-primary fk-uix-button-  size-default") Then
    Element.InvokeMember("click")
    Exit For
  End If
 Next Element

error from code i tried: Object reference not set to an instance of an object.

Viewing all articles
Browse latest Browse all 27201

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>