Testing Circus – December 2014 Edition

Software Testing Magazine – Testing Circus December 2014 Edition is out. This is the 51st edition of this software testing magazine. Download a free copy of Testing Circus December 2014 Edition, read, share with testers. Some awesome stories in this edition: Interview with Anna Royzman by Srinivas Kadiyala Four Simple Steps to Becoming the Best […]

Selenium Hangout #6

[youtube=https://www.youtube.com/watch?v=ASVqZPN3j7k] Agenda 01:35 – 9:45 W3C Update 11:23 – 16:00 Selenium 3 Status Update 16:05 – 17:10 Marionette (FirefoxdDiver rewrite) testing help 17:20 – 19:27 ChemistryKit rewrite 17:28 – 20:24 Visual Testing Part 1 20:25 – 23:47 Selenium Guidebook in Java! 23:52 – 29:51 Visual Testing Part 2 For More details see the Official Selenium […]

Basic Java JUnit Test Setup

Here is a sample WebDriver Java test using the JUnit framework: [code] package WebDriverTest1; import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class WebDriverTest1 { private WebDriver driver; @Before public void setup() throws Exception { driver = new FirefoxDriver(); } @After public void teardown() throws Exception { driver.quit(); } […]

Setting up your Mac for Java WebDriver Tests

There are a couple of setup steps required before you can run a Java JUnit WebDriver test on your Mac. As always there are a number of different ways this can be done but I will outline one that has worked well for me. I’ll just outline the steps involved first and then go through […]

Getting the selected item from a drop down list

In Selenium IDE you could simply use getSelectedLabel | locator and that was your currently selected item in the drop down list. Its a bit more of a roundabout way with WedDriver as you can see from the method I have written below: [code] using OpenQA.Selenium; using OpenQA.Selenium.Support.PageObjects; // … public string getSelectedLabel(ddlDropListID) { string […]

Switching Frames in WebDriver

In WebDriver there is no direct replacement of the Selenium IDE command selectFrame, however there is a fairly straightforward approximation by using the driver.SwitchTo() method. This method allows you to change the focus to different windows, alerts and frames, but we will be focussing on frames in this post. Below are examples on how to […]

Page Object Model

Page Objects are a way to encapsulate the technical details of a web page and the services it provides so that the developer of a test does not need to delve into the structure of the webpage. Essentially the Page Object acts as an interface between the web page and the testing of that page. […]

How to execute JavaScript in your C# tests

In WebDriver you can call javascript functions programatically without having to click on a link with javascript code as the href attribute. This functionality uses the IJavaScriptExecutor interface. This allows you to execute javascript commands on your browser from your Selenium Webdriver test. Here is a short example to get the current URL: [code] IWebDriver […]

How to MouseOver in your C# tests

I have created a fairly simple to use C# method to perform a MouseOver operation, all you need to do is to specify the web element to MouseOver. Add the following using statement first: [code]using OpenQA.Selenium.Interactions;[/code] Then create the following method: [code] public static void MouseOver(IWebElement theElement) { Actions builder = new Actions(driver); builder.MoveToElement(theElement).Build().Perform(); Thread.Sleep(1500); […]