Reputation: 3692
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?
Upvotes: 0
Views: 285
Reputation: 1850
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.
Upvotes: 1