Is there a way to automatically grab all the elements on the page using Selenium?

Posted by VGambit on Stack Overflow See other posts from Stack Overflow or by VGambit
Published on 2011-01-17T18:44:16Z Indexed on 2011/01/17 18:53 UTC
Read the original article Hit count: 145

When creating tests for .Net applications, I can use the White library to find all elements of a given type. I can then write these elements to an Xml file, so they can be referenced and used for GUI tests. This is much faster than manually recording each individual element's info, so I would like to do the same for web applications using Selenium. I haven't been able to find any info on this yet.

I would like to be able to search for every element of a given type and save its information (location/XPath, value, and label) so I can write it to a text file later.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about selenium