Testing integral parts of web browsers that rely on user interaction is always tricky and often requires a cumbersome implementation. File inputs are no exception. Consider the following JavaScript snippet that is triggered when we add a file to an input field.