开发者

How does selenium.getEval() work?

I a开发者_C百科m trying to use selenium.getEval() to get all of the elements with a certain name. How do I do it?


It doesn't work like that. getEval() returns a string representation of whatever JavaScript is executed. You can't return IHtmlElement objects or whatever and expect to manipulate them. You can convert them to JSON, however, if that's what you want. You'll want to call your getElementsByTagName() on the window.document object to ensure you're querying the browser under test and not the control browser.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜