I'm using WatiN and C# to fill out a form online but my Search field has the same name as another element. My search field is defined as follows:
<input type="text" value="" size="50" name="search">
There is also a different search field in another section of the same screen defined as:
<input class="Search-TextBox" type="text" value="" size="15" name="search">
I want to fill out the formerly mentioned text input search field. Is there a way to find and fill the search box based on size maybe?
I have the same issue with the search field's Submit button. Its the same name and size so how do I specify which button to click search on?
You can use any of the following mechanisms
If all the attributes are the same, you can search on the basis of the ordering after getting a filtered list.