How would I call a function in Javascript on a loaded site in a Windows Form Application web browser? For those that have used Chrome, I’m looking to call Javascript like you can with the Javascript console.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is the answer:
InvokeScript runs javascript functions. if you have a javascript function like function check(value)
{...}than your functionName is “check” and your args array hold value, if you have more parameters you can fill your args as much as parameters you want. The code above runs the javascript function as functionName(12);If you want to access any element you can use this code:
wb.Document.GetElementById(“ControlId”)
.InnerText = “Bla bla”
.InvokeMember(“click”)