I am automating a website, there's web page containing few text fields, dropdowns. There is a mandatory field check for a dropdown, if I select the default option (which is 'Select') I get an error message - 'This field is required' which is expected.
If I automate the above scenario, using selenium c#, I do not get any error message if I select the default option using my user defined function(taking dropdown elements into a list and clicking on 0th element which is 'Select'). I am navigated to the next page, which is not expected.
I am just curious to know why this different behavior for automation and manual parts. I am giving sufficient wait time for the error messages, even after entering the data I have given wait time, then why the difference?
Select
is placeholder text and selecting the element at index 0 is actually a valid option.