WatiN SelectList - How can I select any element from the list?
By : Choocha
Date : March 29 2020, 07:55 AM
I hope this helps you . I'm using WatiN to do some web testing and have run into a problem with a select list. I have to run through a few pages first, adding a 'Category' element that will populate said troublesome select list. I have been able to easily select an element from the list using ByValue, but the problem here is that the values is more of an index element that is created on the fly with a seemingly random value when the 'Category' element is created. I have tried to use the text that is under the option list in the html but it cannot seem to find it. At this point I'm willing to settle for any element in the list that isn't value "-1" as this is the "Please select an option item". , If i understand correctly maybe this can help: