WebDriver: A New Way to Record Scripts

DZone 's Guide to

WebDriver: A New Way to Record Scripts

Silk WebDriver makes writing test code much easier by letting you record web UI tests and generate Selenium WebDriver scripts.

· DevOps Zone ·
Free Resource

Writing Selenium WebDriver test code can involve learning a lot of syntax to write the selectors, and so on. This can be a little bit daunting at first. Additionally, in the development of your test scripts, you may have mistakes in the selectors which you only notice when you try to run the test. This means you lose time when you have to go back, edit the test, and try again. These factors speak for using an automation solution which enables you to record a test and generate the script. Something which automates creating the correct selectors and script as a whole. An app which creates the initial script and gives you the possibility of tweaking the script manually afterwards.

There is a just such a new app available, called Silk WebDriver, which has been developed for recording web UI tests and generating Selenium WebDriver scripts. There is a free version available for Windows for download (see link below). This app has a simple and intuitive interface which enables you to select your preferred browser and point to the web address you wish to test and then record your script. You can play back scripts directly in Silk WebDriver before you save them. Silk WebDriver also has the ability to export to various language and framework combinations e.g. Java JUnit, Java TestNG, Ruby RSpec, JavaScript Jasmine and others. You can then schedule your scripts to run, for example, in your nightly build in your preferred way.

The list of supported languages and frameworks is growing as each new version of Silk WebDriver is released. As mentioned Silk WebDriver is currently available for Windows and a version for Apple MacOS is being planned. There will also be a professional version which includes additional functionality such as support for mobile devices.

For a more detailed tutorial, this is quite a nice tutorial.

Download it here.

Why not give the free version a try? Creating new WebDriver tests or updating existing WebDriver tests has never been easier.

webdriver ,functional testing ,selenium ,test automation ,devops

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}