1

I'm selecting a select input using the following code

WebBrowser.Current.Div(Find.ByClass("grideditrow"))
    .SelectList("lst" + itemName).SelectByValue(value);

Though selections are made correctly by WatiN, KnockoutJS viewModel binded to this input does not get updated with selected value. Is there anything else in WatiN to make sure selection are completed in Browser?

Raj
  • 4,405
  • 13
  • 59
  • 74
  • Try the solution from: http://stackoverflow.com/questions/3712825/unable-to-fire-jquery-change-event-on-selectlist-from-watin – RP Niemeyer Dec 19 '11 at 14:08
  • See this post answer: http://stackoverflow.com/questions/7877193/how-to-fire-a-jquery-selector-from-watin/7887209#7887209 – alonp Dec 21 '11 at 10:11

1 Answers1

0

You can trigger change element by jquery, this updates the knockout model:

browser.Eval("$('.grideditrow').val(value);$('.grideditrow').trigger('change');");

Eric Hotinger
  • 8,957
  • 5
  • 36
  • 43
Bura Chuhadar
  • 3,653
  • 1
  • 14
  • 17