
This library can control the browser and supports wide variety of browsers including all popular ones like Firefox, Chrome, Safari and IE.
The programming for web driver scripts can be done in Java, Python, Ruby and .NET. This article focuses on only Java code snippets, however the equivalent code can be easily written in any other supported language.
Some of the very common use cases like taking a error snapshot, or uploading a file are very easily accomplished using Web Driver api.
Below are some of the code snippets that I frequently use when I am creating java test cases using selenium webdriver. I hope this will help you save some time in your test case code creation.