I need to get a element by type in C# the HTML looks like this:
<button type="submit" class="orangeBtn">Send Invitations</button>
And I want it to be able to where I can invoke("click") it, but it isn't appearing to work in C#. My current code is:
HtmlElement m_SubmitField = m_Browser.Document.All["orangeBtn"];
if (m_SubmitField != null)
m_SubmitField.InvokeMember("click");
Is there an alternative working way to do this?
This is NOT my server, so I can't edit the HTML or add jquery.
I'm making an automated application to send invites to friends that I want to join, but they made the button without a id or name as seen above, so is there anyway to have it invoke("click") in C# using a different method?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…