Fixed tests in browsers and SauceLabs

Using `this` can very problematic and is unsafe in many cases. In this case, it was causing a lot of issues with browser unit tests