Description of all the various tools that we need to set up and prepare the Selenium playground. We’ll take a look at tools such as Selenium IDE, WebDriver, Selenium Server, Java, JUnit, Maven, and IDEA.
- [Instructor] Welcome to video 1.3 of this section. In the previous video we've taken a look at the various tools we'll be using throughout the course. In this video, we will take deeper look at the tools, frameworks, and plugins that we spoke about in the last video. Let me start with the Selenium IDE. It's a plugin to Firefox that will allow you to record a journey through a web application and replay it. Selenium IDE also supports saving of the recorded items as a test case, as well as a test suite.
It lets you export recordings to various language-supported scripts, such as Java, C Sharp, Perl, Python, and so on. You will also be able to assert the presence or abundance of elements and texts in your page. Selenium IDE is a great place to start. While it's good to get you off the ground, Selenium has other offerings like Selenium Web Driver that give you greater control over what you want to test and how you want to test it.
These offerings have implementations in various programming languages, which helps overcome the shortcomings of Selenium IDE. To be more flexible you need a programming language and be able to control a browser with the help of it. Automating Selenium through a programming language can be done with WebDriver and Selenium Server. Once you write a piece of code you may execute it locally using Web Driver or remotely using Selenium Server.
You typically open up the web app, use it, and verify an expected change that you could observe. You may choose from any of these programming languages for controlling a browser with Selenium. I will use Java for our course. It being my personal preference, but you can go ahead with any other as you wish. As I said, I will be using Java. You may wonder will this be a problem if you don't know a lot about Java.
My answer is I hope not. If you don't know anything about Java then I suggest that you read up a little bit. At least enough so you can write your own Hello World. There are many books and online tutorials for learning Java that you can get by searching. Here are a few references you can take a look at. Java, the Complete Reference by Herbert Schildt, tutorialspoint.com/java, learnjavaonline.org.
If you know how to write Hello World in Java then I think you'll be fine. We will not use any complicated Java syntax and everything will be introduced in small steps. Selenium doesn't offer any default verification framework. You will have to select one yourself. I will use JUnit in this video course. JUnit is a well-known unit testing framework in Java. You can download JUNit from the following site: junit.org.
For Maven Repository mvnrepository.com/artifact/junit/junit. You can choose some other framework if you like. TestNG or Spock are the other two candidates. Some other languages that you can use rather than Java are RSpec in Ruby, Nose in Python, NUnit and MS Test for C Sharp. Our scripts must be compiled and executed.
This can be done from a command prompt. It is, however, a lot easier to use a build tool. We will use Maven in this course. Maven will help us handle dependencies, compiling, and running our scripts. To know the details about Maven you can go through maven.apache.org/guides/getting-started/ maven-in-five-minutes.html.
Another one is tutorialspoint.com/maven. Editing a Java program can be done using any text editor. I prefer IntelliJ IDEA. It is a free Java IDE, but you could easily use any of the other popular IDEs available, such as Eclipse, NetBeans, Sublime Text, and much more. There are two different versions you can download: Community Edition, free, and Ultimate Edition, paid.
You can download from the following site: jetbrains.com/idea/download. I use the Community version in this course. If you want to support the development of IDEA then you can purchase the Ultimate Edition. In this video we have taken a look at a few of the tools, frameworks, plugins that we are about to use in a bit more detail. That was a lot about the development environment.
We need two more tools to complete our toolbox: Firebug and FirePath. Let's check them out in the next video.
Selenium gives developers the power to control web browsers and use them to automate web application testing. As an open-source toolset, Selenium makes it easier for testers to evaluate web applications without putting in any extra time and effort.
Mastering Selenium Testing Tools is all about demystifying the Selenium suite. Learn to verify web applications, control browsers with code, and scale up the testing environment by distributing the execution of web applications on different browsers running on different operating systems.
Author Ripon Al Wasim starts with the Selenium IDE, a Firefox plugin that performs a simple record-and-playback of interactions with the browser. A tester aiming for professional output can use WebDriver, an advanced scripting tool that allows you to locate the elements you need to interact with using their name: id, xPath, or CSS. Next, learn to express the desired behavior using a well-known framework for behavior-driven development (BDD) called Cucumber for Java, which uses a language called Gherkin. Last but not least, Ripon shows how to run tests on the Selenium Server, and walks through a complete working example of Selenium and Cucumber in action, for acceptance testing of a web application.
- Preparing your Selenium test environment
- Using the Selenium IDE
- Scripting in WebDriver
- Locating web elements
- Writing test cases with the Page Object Model
- Enabling continuous delivery with a continuous integration build system
- Working with Cucumber and Gherkin
- Describing features with Cucumber
- Running tests on Selenium Server