Search code examples
winformswatin

Selecting new value from form using watin


I have Watin.Core.teaxfield my date = x.textfield(find.byid("whatever")) My date.value=2014-06-06"....this will set the value My question is how can I select the value from a label or combo box that is is my windows form .thanks


Solution

  • For a combobox, you can select a value using something such as:

    SelectList selectList = browser.SelectList(Find.ById("some_id"));
    selectList.Option("some_option").Select();
    

    To get a label value:

    string value = browser.Label(Find.ById("some_id").Text;