If your MissingRequest2 check fails afterward that could mean that you did check for the exact version of the file. That’s a good idea if you want to be sure the version does not get updates coincidentally. In most cases, it’s not. If the version does not matter for the test case there is an easy way to make the checks more robust. Just use regular expressions.
It is possible to use a placeholder where the version number is. In our example, it would be “framework(.*).js”. From now on it is only needed that there is a framework.js file loaded. No matter what version.
We changed the behavior of our browser in a way that always when they should request the google analytics counting pixel we redirect them to example.com. The good thing with redirects is that the initial request is still visible within our tools.