Watir Select_List Not Triggering Dynamic Page Updates

We are writing some automation scripts for a product written in .NET.

PRODUCT:

  • When you choose an item in the select list, it dynamically generates
    new fields to collect. If you manually click the value you want… the
    new fields populate. Also, if you hit a letter on your keyboard, it
    choose the appropriate value and fields populate. BUT… if you just hit
    the down arrow, you can choose the value you want, but the dynamic
    fields don’t populate.

PROBLEM:

  • Watir is successfully selecting our list value, but the extra fields
    are not populating. (similar to just hitting down on the arrow keys and
    choosing your value)

WATIR CODE:
ie.select_list(:id, “ctl00_DropDownList1”).select(“Blah”)

I can’t change the product that we are testing. Is there another way to
select values from the select_list that could emulate a user clicking
the dropdown box and choosing a value directly?

ie.select_list(:id, “ctl00_DropDownList1”).select(“Blah”)
ie.select_list(:id, “ctl00_DropDownList1”).fire_event “onclick”

http://stackoverflow.com/questions/3787555/how-to-find-out-which-javascript-events-fired

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs