DrunkenMonkey
DrunkenMonkey

Reputation: 87

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

Upvotes: 0

Views: 417

Answers (2)

DrunkenMonkey
DrunkenMonkey

Reputation: 87

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.

Upvotes: 0

prostynick
prostynick

Reputation: 6219

Are you using IE 9? If so you will probably need WatiN 2.1 released week ago.

Upvotes: 1

Related Questions