Selenium – access a DOM object with Selenium


I am coming from a QuickTest Pro background where I can get to any element's DOM object with the .object method. I want to know what the equivalent is in Selenium RC.

Best Solution

Sure you can. The real question is: what do you want to do with it? Check out the getEval() command. It can evaluate any JavaScript and return the result in a String format. That means you can't get the full DOM object back in to Java/C#/perl/etc, but you can get back attributes of it (ie: innerHTML, etc).