Watin SelectedItem on a selectlist returns null
Prior to installing Wat开发者_JAVA百科in 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
Are you using IE 9? If so you will probably need WatiN 2.1 released week ago.
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.
精彩评论