Another IE select issue (on XP-IE8):

HTML:
<select title="Selection Display" id="selection_display_option">
  <option value="opt1">opt1</option>
  <option value="opt2">opt2</option>
  <option selected="selected" value="opt3">opt3</option>
</select>


CODE on IRB:  (this works)
irb(main):056:0> option_selected = "opt1"
irb(main):057:0>
browser.select(:id=>"selection_display_option").select(option_selected)
irb(main):059:0>
browser.select(:id=>"selection_display_option").send_keys("\xEE
\x80\x87")
=> ["\356\200\207"]
irb(main):060:0> #assert <some_code_to_verify>
=> nil

RUBY CODE:
  def display_new_result option_selected
 
browser.select(:id=>"selection_display_option").select(option_selected)
    if browser.driver.browser == :internet_explorer
      sleep 10
      browser.select(:id=>"selection_display_option").send_keys("\xEE
\x80\x87")
      sleep 10
    end
    assert <some_code_to_verify>
  end

But when ran as a script...getting a generic assert error due to the
page not loading correctly.
I tried the usual .click , fire_event(see below) , and my last attempt
above was to hit enter key above.

I also tried 
http://stackoverflow.com/questions/3787555/how-to-find-out-which-javascript-events-fired
calling a fire_event("onclick") and fire_event("click")
  mousedown clientX=320, clientY=108
  mouseup clientX=320, clientY=108
  click clientX=212, clientY=-9
  mouseout clientX=320, clientY=108

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

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to