Hi,

   I am running an app where field 'Site' has a select list wihch gets
loaded using Jquery. Next field 'Pub code' gets loaded depending on
'Site'  selection. For some reason set select list does not set it. I
see value getting changed on the screen but the next field does not
get loaded by application. Which tells me that earlier selection is
not being recognized.

I verified it by assigning it to a varible and printing it. It ruturns
NULL.

Part of my screen looks like

   Site :                   _________    ( drop down)

   Pub Code :         __                  ( Drop down. Will expand
depending on        Site  selection)


Earlier I was running this under WATIR 1.6.2.
But I also tried this under Ruby 1.9.2 / Watir 1.7.1 / cucumber -
0.10.0 / rspec -2.5.0.


My script has following..As you can see I have tried all kinds of
tricks..

Then /^user selects the Site: "([^\"]*)"$/ do |site_id|
        c = @ie.select_list(:id, "adjustment_site_id").set(site_id)
        p c
        #@ie.refresh
        #@ie.fire_event("onMouseUp")
        #@ie.fire_event("onClick")
        #@ie.send_keys("{ENTER}")
        #java_script_click(@ie)

end


It runs as follows
C:\Documents and Settings\ychodank\My Documents\ruby\scripts\qa\Scripts
\Circ Ad
\features>cucumber login.feature
Feature: User logs in to Circ Adj

  Scenario: User logs in to Circ Adj         # login.feature:3
    Given "csrep" logs in                    # step_definitions/
login.rb:1
    And clicks the link: "Create adjustment" # step_definitions/
login.rb:8
nil
    Then user selects the Site: "Greenville" # step_definitions/
login.rb:13

1 scenario (1 passed)
3 steps (3 passed)
0m6.702s

Rightnow my cucumber test is not complete. It just has 3 steps. But
when user selects "Greenville" I should be able to see next field
'pubcode' expanding.

If I point to field Site in developer toolbar I see follwoing code
<select name="adjustment[site_id]" id="adjustment_site_id"
jQuery1297435160629="3">

I tried to research this for a long time and have been unsuccessful in
finding resolution.

Thank you in advance for any help..

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to