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

  • SEARCH
  • Home
  • 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 7860331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:14:48+00:00 2026-06-02T22:14:48+00:00

This question is regarding the select_list in watir. We have a web application which

  • 0

This question is regarding the select_list in watir.

We have a web application which is behaving strangely.

There is a four page form that allows users to register on the website and in one of the pages of the form there is a select_list where the user has to select one of the list of values.

The list of values are the list of cities.

the HTML code of the select list is like this

<select id="roleDetailsForm:city" name="roleDetailsForm:city">
<option value="">---Select---</option>
<option value="ABG">ABINGDON, QL</option>
</select>

The watir code I have written to select one of the list of values is

@browser.select_list(:name => "roleDetailsForm:city").set "ADELAIDE, SA"

The issue is

The developers logs says that select_list is sending the text instead of value to the sever, which is failing the request.

So, instead of ADL going as the value selected to the server, “ADELAIDE, SA” is going as the value selected.

However, this is happening only when running the script.

When a user manually selects the same text in the select_list and clicking on submit, it is sending “ADL” as value which is correct

Right now, the developer has been insisting that it is due to the script that the application is behaving strangely.

However, I am unable to figure why this is happening?

Eager to know if anyone else has experienced such issues and if this is really due to the script.

In addition to the watir code above I also tried

@browser.select_list(:name => "roleDetailsForm:city").set  (@browser.select_list(:name => "roleDetailsForm:city").options[10])
  • 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-06-02T22:14:49+00:00Added an answer on June 2, 2026 at 10:14 pm

    Try using

    @browser.select_list(:name => "roleDetailsForm:city").select("ADELAIDE, SA")
    

    I think set is just an alias for select in the original Watir, but I’m not certain anymore.

    It’s worth a shot.

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

Sidebar

Related Questions

Again I have a question regarding this plugin: http://t.wits.sg/2008/06/20/jquery-progress-bar-11/ What I want to achieve
There are many question regarding this topic but there is no clear answer. Although
I have this very straight forward question regarding Thread and Timer classes in Java
I have a question regarding a rather advanced DataModel which I would like to
I have something of an abstract question regarding managing live feeds/polling on web sites.
I have somewhat of a thought question regarding jQuery Ajax. My question is this:
Following on from this question regarding calculating a member I have 2 calculated members
regarding to this question , i have a problem if use that query for
Yesterday I posted this question regarding using lambdas inside of a Join() method to
Yesterday, I asked this question regarding best practices for a simple information retrieval system

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.