how to execute Js Script in Selenium Webdriver C# -
this line code returns number of elements. document.getelementsbyclassname("entry entrywriteable");
-> returns 70 elements
i want implement loop that, below line of code execute element.
document.getelementsbyclassname("entry entrywriteable")[i].value;
can 1 me how impliment in c# selenium ?
in order execute js in selenium on c# should use next code:
((ijavascriptexecutor) driver).executescript("your code"));
so can execute js code want.
the executescript
returns object
can typify it.
Comments
Post a Comment