Sprouts
Regular Member
- Mar 20, 2010
- 464
- 328
Hey Guys,
I'm trying to create a simple youtube bot which posts a comment (with web browsers) as my first C# project but I'm having some troubles clicking the "Post" button which posts the comment.
This is the code I'm using to click regular buttons which have an id element in HTML:
but the button code in the HTML has no id - instead it uses javascript. Here's the button code:
My question is: How do I click this button?
Thanks in Advance.
I'm trying to create a simple youtube bot which posts a comment (with web browsers) as my first C# project but I'm having some troubles clicking the "Post" button which posts the comment.
This is the code I'm using to click regular buttons which have an id element in HTML:
PHP:
webYoutube.Document.GetElementById("signIn").InvokeMember("click");
but the button code in the HTML has no id - instead it uses javascript. Here's the button code:
PHP:
<button type="submit" class="comments-post yt-uix-button yt-uix-button-default" onclick=";return true;" role="button"><span class="yt-uix-button-content">Post </span></button>
My question is: How do I click this button?
Thanks in Advance.