Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 523327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:26:47+00:00 2026-05-13T08:26:47+00:00

I’m using Selenium to ease my testing burden and I have about 1,000 different

  • 0

I’m using Selenium to ease my testing burden and I have about 1,000 different drop down list combinations (spread across multiple pages and drop down lists) that need to be tested. Basically, what I would like to do is select each <option> inside of a <select>, click the Submit button, select an item (first, second, third, etc.) in the drop down list on the resulting page, click submit, and then go back and select the next item, in sequence. Each time, it should assert that a certain value (related to the drop down list value selected) is present on the final page. Does anybody know if this kind of logic is possible in Selenium?

I’m having a hard time explaining this, so hopefully this pseudo code clears things up

foreach option in select
  select option
  submit form

    foreach option in select
    select option
    submit form

      assert that page contains text that matches selected values

Edit: I have selected values from the drop down list while the recorder is playing, but it seems like the recorder isn’t picking up the selected drop down list values. Nor have I been able to figure out how to perform the operation for each <option> in a <select>.

The first question I have is whether or not it’s even possible. If it is, could somebody please point me in the right direction to get me started?

Edit 2: I’m not opposed to using another web automated testing utility. If anybody has any recommendations for a free alternative, please feel free to make that recommendation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:26:48+00:00Added an answer on May 13, 2026 at 8:26 am

    What language are using Selenium in? If you’re just using Selenium by writing HTML, I’d recommend switching to a programming language and using Selenium RC — bindings are available for a wide variety of languages, such as Java and Python. In Java, I believe the following would do what you want:

    void test(Selenium browser, String startPageUrl,
              String firstFormLocator, String firstSelectLocator,
              String secondFormLocator, String secondSelectLocator) {
        browser.open(startPageUrl);
        for (String option : browser.getSelectOptions(firstSelectLocator)) {
            browser.open(startPageUrl);
            browser.select(firstSelectLocator, "label=" + option);
            browser.submit(firstFormLocator); // Or click the submit button
            for (String subOption : browser.getSelectOptions(secondSelectLocator) {
                browser.open(startPageUrl);
                browser.select(firstSelectLocator, "label=" + option);
                browser.submit(firstFormLocator); // Or click the submit button
                browser.select(secondSelectLocator, "label=" + subOption);
                browser.submit(secondFormLocator); // Or click the submit button
                // Do your assertions
            }
        }
    }
    

    The code isn’t exactly readable, so it might be worth some time abstracting the page away slightly using the Page Object pattern. This also helps make the code more maintainable, for instance when you change the ID of an element, you only need to change it in the page object rather than every test.

    Also bear in mind that doing this 1000 times isn’t going to be quick. It might be worth seeing if you do similar testing just below the web interface to allow quicker feedback from tests, and then test the web interface is using the lower layer correctly. Also, do you really need 1000 tests? It seems that there’s some redundancy in testing here — is the 1000th test going to fail if the last 999 have passed?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 368k
  • Answers 368k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use the UITableViewDelegate method heightForRowAtIndexPath Say that your data model… May 14, 2026 at 5:07 pm
  • Editorial Team
    Editorial Team added an answer Nope it doesn't need to be in a Form. Even… May 14, 2026 at 5:07 pm
  • Editorial Team
    Editorial Team added an answer Yes, it is possible, however you shouldn't try to reinvent… May 14, 2026 at 5:07 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.