I am trying to use selenium.getEval() to get all of the elements with a certain name. How do I do it?
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.
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.