Search code examples
drop-down-menuwatin

Watin SelectedItem on a selectlist returns null


Prior to installing Watin 2, we were using the SelectedItem property on a dropdown/select list which would return the text of the current item selected in the list of values. After upgrading to Watin 2.1, the same method returns null.

Following is my observation: HasSelectedItems is false SelectedItems.Count = 0 GetAttribute("selected") returns null AllContents has all the items in the select list and the AllContents.Count = 30 (since I have 30 items)

Is there a new way to get the current item in a dropdown/simple select list? Thanks, DM


Solution

  • I had to re-copy the Microsoft.MSHTML.DLL and it works like magic now. Will be running a variety of tests on IE9 with VS 2010. I guess it should all be good now.