I want to test posting to a form with a time field. If the form [time input] isn't complete the test would fail.
How to handle browser behavior in a different locale, like formatting the input as 24 hour time, or 12 hours with AM/PM input?
<input type="time" name="time" value="" class="form-control">
Update: What I have tried:
I tried filling the time with string
1300 it passed in my development environment but because of the different locale setting in test environment and development, my test failed.
I can just set the string to
1300pm to get it work for example, but I wonder how to test this case in general.
- Should a browser-automation test check browser behavior and change input accordingly?
- Should apps not use input that behaves differently?
- Should a test environment have the same locale with the development environment? [if this is the preferred way, I already ask a question in another site, but haven't found the answer yet]
Sorry, I kinda lost in testing, so I can't come up with a straightforward question.