Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there an easy way to randomly click/check all radio/check boxes and select random items in all drop-down menus in a webpage? I am testing my web site and there are a bunch of these. It is a pain to manually do all of these so I am wondering if some of you might have already coded up a solution (I imagine JavaScript would be the most obvious route) that is usable in all major browser/platform. Thanks!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You might be interested with Selenium for automated web tests. It is quite powerful tool which can open the browser, perform various actions and assert some conditions.

You may also write some JavaScript that uses document.getElementsByTagName to get all <input>s for instance, iterate over them and randomly check them.

share|improve this answer
    
see also sqa.stackexchange.com/questions/tagged/selenium –  StevenV Oct 24 '11 at 13:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.