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. […]

Checking link status in C#

Sometimes you need to test an application that has external links or have the need to check links and it doesn’t make a whole lot of sense to physically visit these places and verify that something has loaded on it because it is way out of your control and that site could change at any given moment, making your tests flaky. One way […]

Welcome to Automated

What’s all this then? Automated Tester is a site for community and professionals to talk about and help each other in all things automated in the testing world. I will try to post snippets of what I know but the main intention is to drive use of the forums, comments and such like. Who are you? My name is Justin […]