SeleniumConf is coming to Chicago

SeleniumConf Chicago is a two-day conference for test automation professionals on October 18 & 19 preceded by a full day of workshops on October 17. You can look forward to inspiring and practical talks, in-depth Selenium training workshops, fantastic networking opportunities in the ‘hallway track’, and so much more.

This year’s official SeleniumConf in the US is taking place in the Windy City at the Holiday Inn Chicago Mart Plaza River North.

  • Address: 350 West Mart Center Drive, Chicago, Illinois 60654

Please note: there are a number of Holiday Inn hotels in Chicago. The conference is taking place at Mart Plaza River North hotel only. For more details please see the Selenium Conference website:

Selenium 3.0 Webinar

In case you missed it, here is the Selenium 3.0 Webinar:

The very first code for Selenium RC was pushed in November 2004.
The first code for WebDriver was released in January 2007.
Selenium 2.0 shipped in July 2011.
In 2016, the Selenium Project is working hard to (finally!) ship 3.0.

Watch this webinar with Simon Stewart, and discover:

  • What will this release contain?
  • What impact will it have on your test runs?
  • How can you preserve your existing investment in tests using the Selenium WebDriver APIs, and your even older RC tests?
  • Looking forward, when will the W3C spec be complete?
  • What can we expect from Selenium 4?

Select Option in a Select using Partial Text

If you ever come across the need to select an option in a drop down list when you only have some of the text here is how you can select a particular option oin a drop down list using a partial text selector. In this example the drop down list would be populated with strings formatted as follows: FirstName LastName – Address. eg “John Smith – 1001 Main St”. For the test we only have the person’s name available to us.

IWebElement ddlList = driver.FindElement(By.Id("ddlList"));
string strName = "John Smith";

ddlList.FindElement(By.XPath(string.Format("./option[starts-with(text(), '{0}')]", strName))).Click();

Microsoft launch driver for Edge

ms_edgeMicrosoft have announced a new WebDriver server for the upcoming new Windows 10 browser, Microsoft Edge. They announced support for automated testing of Microsoft Edge through the W3C WebDriver standard. To use WebDriver with Microsoft Edge, you need the MicrosoftWebDriver server on a Windows Insiders build of 10240 or newer. You can read their blogpost here at Bringing automated testing to Microsoft Edge through WebDriver.

Microsoft also provided a sample test using C# and the the as yet unreleased Edge bindings to open a webpage in MS Edge, navigate to and search for “webdriver”:

using System;
using System.IO;
using OpenQA.Selenium;
using OpenQA.Selenium.Edge;
using OpenQA.Selenium.Remote;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Support.UI;

namespace BingSearchTest
    public class Program
        static void Main(string[] args)
            RemoteWebDriver driver = null;
            string serverPath = "Microsoft Web Driver";
                if (System.Environment.Is64BitOperatingSystem)
                    serverPath = Path.Combine(System.Environment.ExpandEnvironmentVariables("%ProgramFiles(x86)%"), serverPath);
                    serverPath = Path.Combine(System.Environment.ExpandEnvironmentVariables("%ProgramFiles%"), serverPath);
                // location for MicrosoftWebDriver.exe
                EdgeOptions options = new EdgeOptions();
                options.PageLoadStrategy = EdgePageLoadStrategy.Eager;
                driver = new EdgeDriver(serverPath, options);

                //Set page load timeout to 5 seconds

                // Navigate to
                driver.Url = "";

                // Find the search box and query for webdriver
                RemoteWebElement element = (RemoteWebElement)driver.FindElementById("sbox");

                // Wait for search result
                WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(5));
                wait.Until(x => x.Title.Contains("webdriver"));
            catch (Exception e)
                if (driver != null)

Finding an Element by an Attribute

Sometimes it is not always possible to uniquely identify an element by using the standard ways such as By.ID or By.Name etc. And there can be any number of reasons why this would be the case. However there is an alternative way to find an element by using one of the element’s attributes:

driver.FindElement(By.CssSelector("[title='Unique Identifier']"));

This example will find the element that has “Unique Identifier” as the value for its title attribute. Using the CSS Selector is an elegant way to find this element, but there are other ways to achieve the same outcome. Using XPath you can achieve the same outcome as per this example:

driver.FindElement(By.XPath("//*[@title='Unique Identifier']"));

However I find that this XPath solution is not as readable as the previous CSS Selector version. There is a plus however to using XPath as we can fine tune the search. The //* part of the XPath indicates that we are to search ALL HTML tags for the specified title. But if you change the //* and replace the asterix with the name of an HTML tag such as img then we can search for only <img> elements that have the specified title.

driver.FindElement(By.XPath("//img[@title='Unique Identifier']"));

If you come across any similar solutions, add them to the comments below.