0

i'm testing javascript in selenium 2 webdriver under visual studio 2010. is there any good ways to call method belonged to current javascript-object on page?

1 Answer 1

1

I use this to get the innertext of elements that are hidden: ((IJavaScriptExecutor)webDriverInstance).ExecuteScript("return arguments[0].innerHTML", this.element).ToString();

The way ExecuteScript is implemented is very similar to String.Format with params object passed in as the second parameter.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.