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 6475751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:44:32+00:00 2026-05-25T06:44:32+00:00

I am trying to work my way around the ObsoleteElementError http://bit.ly/qhEhMv and scratching my

  • 0

I am trying to work my way around the ObsoleteElementError http://bit.ly/qhEhMv and scratching my head at collecting the values from a select_list. I’m sure I have looked at it so long I’m missing something stupid. The closest I have got is

SearchPeriodList = browser.select_list(:name => "ctl00$PageContent$ddlPeriodSelector")  
SearchPeriodValues =  browser.options.collect { |item| SearchPeriodList.option.value }  

SearchPeriodValues.each do |item| 
    puts "Selected Period: #{item}"
    browser.select_list.option(:value => (item)).select
    browser.button(:id => "PageContent_btnShowResult").click    
end


<select name="ctl00$PageContent$ddlPeriodSelector" id="PageContent_ddlPeriodSelector">
<option value="42">2011 Jun-Jul</option>
<option value="41">2011 Apr-May</option>
<option value="40">2010 Dec-Mar 2011</option>
<option value="39">2010 Sep-Nov</option>
<option value="33">2010 Jul-Aug</option>
<option value="26">2010 May-Jun</option>
<option value="18">2010 Mar-Apr</option>
<option value="19">2009 Aug</option>
<option value="29">2009 Apr</option>
</select>                                                                                                           
<input type="submit" name="ctl00$PageContent$btnShowResult" value="" id="PageContent_btnShowResult" class="butgo" />

But this just repeats the first value until the total number of values has been reached (in this case 9).

  • 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-25T06:44:32+00:00Added an answer on May 25, 2026 at 6:44 am

    You’re looping on every option in the browser, and not using the block variable.

    Try this:

    require 'watir-webdriver'
    b = Watir::Browser.new
    b.goto 'http://dl.dropbox.com/u/18859962/outka5t.html'
    search_period_list = b.select_list :name => 'ctl00$PageContent$ddlPeriodSelector' 
    search_period_values =  search_period_list.options.collect { |option| option.value }
    # => ["42", "41", "40", "39", "33", "26", "18", "19", "29"]
    search_period_values.each do |item|
      puts item
      b.select_list(:name => 'ctl00$PageContent$ddlPeriodSelector').option(:value => (item)).select
      b.button(:id => "PageContent_btnShowResult").click
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm still a newbie in Android and I'm trying to work my way around
I'm new to ActionScript 3.0 and I am trying to work my way around
just trying to work my way around using Redemption; I've got the following code
I am trying my way around JPA but I cant get this to work
I'm trying to work my way through an Objective-C tutorial. In the book there
I am trying to work out the best way of doing this but not
I've been trying to work out the 'best practices' way to manage file uploads
i am trying to work this out is the simplest way, i am a
Ok, so im trying to work out the fastest way of storing data on
I've been trying to figure out an efficient way to work without reading twice

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.