Microsoft 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 bing.com and search for “webdriver”:
public class Program
static void Main(string args)
RemoteWebDriver driver = null;
string serverPath = "Microsoft Web Driver";
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 https://www.bing.com/
driver.Url = "https://www.bing.com/";
// 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)
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:
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:
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.
If you come across any similar solutions, add them to the comments below.
The latest version of Selenium WebDriver, 2.46.0 has been released. You can grt the direct link for the downloads for the Selenium Server and the Java and C# bindings below. The changelogs for each, as well as other language bindings can be found on the Selenium Downloads page
The Selenium Conf 2015 is happening September 8-10 in Portland, Oregon and there are a limited number of early bird tickets available on sale now. For further details see the Selenium Conf 2015 website @ seleniumconf.org.
The venue for the conference is
Hilton Portland & Executive Tower
921 SW 6th Ave, Portland, OR 97204
You can register online here.
You can submit a talk here.
Many times I have kicked off an automated test using InternetExplorerDriver() only for it to crash straight away as the zoom was not set to 100%. (Why is this required, it makes no sense to me). Previously the only way I could get around this was to open a new window of Internet Explorer, reset the zoom to 100%, close the browser, reopen the browser again to verify the correct zoom. While this worked it wasn’t a very elegant solution.
Finally I found how to ignore the zoom level requirement and it is as simple as this when starting up your browser:
var IE_Options = new InternetExplorerOptions
IgnoreZoomLevel = true,
EnableNativeEvents = false
driver = new InternetExplorerDriver(IE_Options);
This allows you to run your test without having to worry about what the zoom is currently set to.
Here are the release notes from the Selenium 2.45 .Net bindings, which were not available online at the time of the release
- Supports native events for Firefox versions 31 (current ESR), and 24 (immediately previous ESR). Native event support has been discontinued for versions of Firefox later than 33
- Removed automatic installation of SafariDriver extention for .NET. From this point forward, users are expected to manually install the SafariDriver extension into their Safari installation in order to drive the browser. This is due to Apple’s changes in architecture for Safari extensions.
- Added initial implementation of .NET bindings OperaDriver. The .NET bindings will now support the Chromium-based Opera driver without requiring the use of the Java remote WebDriver server. This driver will work with Opera 26 and above, and requires the download of the Opera driver executable. Code cleanup and refactoring will take place under a separate commit. Note that there is still no support in the .NET bindings for the Presto-based Opera without using the remote server, nor is there likely to be.
- Added option to not delete anonymous Firefox profile in .NET. This change adds an option to the .NET FirefoxProfile class so that the driver will not delete the anonymous profile created by the driver. Since the driver cannot and should not use an existing profile in situ because of the multiple instance automation case, this change means that modifications applied to the anonymous profile can be retained and used in future anonymous profiles. The implication is that the user can now make modifications to a profile, and retain those profile modifications (e.g., cookies) into other future profiles, simulating persistent changes over multiple browser launches. Fixes issue #7374.
- Introduced type safe option in InternetExplorerOptions to set the capability to disable check of mime type of the document when setting cookies. When setting cookies, there is a check in the IE driver to validate that the page in the browser is, in fact, an HTML page. Despite the fact that omitting this check can cause unrecoverable crashes in the driver, there is demand for a mechanism to disable this check for older, legacy versions of Internet Explorer. Fixes issue #1227.
Don’t forget you can download Selenium from SeleniumHQ.org
The latest version of Selenium WebDriver, 2.45.0 has been released. While the changelog has not been updated for this release for the C# language bindings, the changelog has been updated for Java, Ruby, Python and Node.js. Hopefully we will see an updated changelog for C# soon.