Visual testing with BackstopJs

There are many visual testing tools out there these days. Previously I have covered Applitools which without a doubt is great product with awesome people who contribute a lot to the testing community. I have also looked at Galen which is a more of a DOM layout tester. In this article we will have a look at BackstopJs, which is […]

JavaScript Injection with Selenium

A useful trick we can deploy is injecting JavaScript to manipulate the browser or change values without specifying user interactions. Let’s see how: internal void CloseActiveTab() { IJavaScriptExecutor js = Context.Driver as IJavaScriptExecutor; js.ExecuteScript("window.close();"); } This code is closing the active tab displayed. By Newing up the IJavaScriptExecutor interface, we can effectively send JavaScript commands directly to the browser console. […]

Manipulating JavaScript Alerts with Selenium

If your application under test generates JavaScript alerts or dialogues how can we interact with these using Selenium rather than look elsewhere such as AutoIt? Luckily we can manipulate these dialogues with Selenium to either accept (click Ok) or dismiss (click Cancel) the pop up allowing your test(s) to continue. You can also get the text of an alert if […]