What else do I need to master when learning Selenium WebDriver?
“I have a question: What else do I need to master, besides Selenium and the obvious complementary stuff like HTML, CSS, JavaScript, JQuery?”
A question that opens a whole world of investigation. I guess different people will need to learn different things. So some of the ‘obvious’ complementary stuff first:
Basic Developer ‘stuff’:
- Learn your chosen programming language well
- Learn the Unit Test framework that you are going to use
- Learn the IDE you are going to use
- Learn the supporting tools e.g. maven
- Learn how to read the error messages of the tools and the programming language
- Learn how to use the debug features in your tools
Basic Web Stuff:
- As well as HTML and CSS, learn how the DOM hangs together and how to traverse it in the browser using the inbuilt developer tools and plugins like FireBug
- As well as JavaScript in general, learn the specific things that will likely make it tricky for you to automate - Ajax, DOM amendment, Event Handling
- Still useful to learn XPath for those parts applications that don’t have a good route through the HTML for locator strategies
Learn WebDriver:
- Get in the habit of reading the underlying WebDriver code. Especially the ‘Support’ classes as they offer good examples of how to ‘wrap’ or supplement WebDriver
Intermediate Developer ‘stuff’:
- Learn refactoring
- Learn how to build abstraction layers and various programming patterns
- Learn how to Unit test your supporting test code
- Learn Domain Driven Design to help you understand how to build domain specific abstraction layers
Intermediate Web ‘stuff’:
- Try and keep up to date with Web Development practices, even if it is just through reading news stand magazines on Web Development
- Setup your own web server and run apps so you learn how to read and access the server logs
- Learn to use Debug proxies so you can see the traffic and investigate the raw HTML as well as the DOM based HTML
Practice.
A lot of the skills I need for WebDriver have come from solving problems and building tests for real applications.
Try and automate applications that use a lot of Ajax, or a lot of 3rd party JavaScript libraries, or have auto generated code like the GWT apps.
Try and use other libraries, not associated with WebDriver, e.g. HTTP libraries, and see if you can use them in combination with WebDriver e.g. login with HTTP directly and move the cookies from the HTTP session into WebDriver, or from WebDriver across to an HTTP session.
Keep learning as much as possible. I can’t predict what you will need to know. But I guarantee that very little of the supporting technology that you can learn will ever turn out to have been something that wasn’t worth learning.
Resources
Since this post was first written in 2013, I now have a lot of books and courses that cover this basic material.
- books - on Java, APIs, etc.
- courses
- WebDriver FAQs
- JUnit Examples
Also check out: