The most useful method of Webdriver is the findElement() method. It can also be the most frustrating: you can see the element you want on your webpage, but it’s often difficult to figure out how to tell Webdriver to find it! There are many different ways to find an element with findElement(): By.idBy.classNameBy.nameBy.linkTextBy.partialLinkTextBy.tagNameBy.cssSelectorBy.xpath I will […]
Author: kristinjackvony
Installing Webdriver
Webdriver is an API that enables testers to find and use web elements in their automated tests. To get set up, you will need to find out what the latest version of Webdriver is. Navigate to this link: http://docs.seleniumhq.org/download and in the section called Selenium Client and Webdriver Language Bindings, find the Java entry and […]
Understanding the POM
A POM file is necessary for any automated testing with Maven. It can seem daunting at first, especially if you don’t usually work with XML files, but it’s actually very simple. POM stands for “Project Object Model”. It contains instructions about where to look for the source code for your tests, and what versions […]
Setting up Maven
In order to use Webdriver, you will need to have Maven installed and set up. Fortunately, the helpful people at Apache Software have created an excellent tutorial about how to set up Maven: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html It probably won’t take you five minutes as advertised, but it will take you less than a day. Don’t worry too […]
Introduction to the Command Line
In order to run Maven (which we will discuss in the next post), it is necessary to know how to run commands from the command line. If you are not familiar with using the command window, this post will explain the two most important commands. My instructions will refer to the Windows command line, but […]
Setting Up Your Java Environment
In order to write your automated tests in Java, you will need the Java Development Kit, or JDK. Here are instructions for downloading and installing the JDK: 1. Navigate to http://www.oracle.com/technetwork/java/javase/downloads/index.html 2. Click on the download button for the JDK 3. Click the radio button that signifies that you have accepted the license agreement 4. […]
Introduction to Java: Passing Parameters
When I first started learning Java, I was fairly perplexed by the parentheses found after every method. Sometimes they were empty, and sometimes they had values in them, and I didn’t understand why. Plus, in the declaration of a method, there was a variable mentioned before the method name, and I didn’t know why that […]
Introduction to Java: Definitions
Another thing I struggled with when learning Java was what the difference was between a Class, an Object, and a Method. Through personal experience and web searches, I have come up with this explanation: A class is the basic building block in Java. It consists of variables and methods. Here’s an example: public class Cat […]
Introduction to Java: Object-Oriented Programming
Java is one of the most commonly used programming languages, and it works well with Webdriver and JQuery, which we will be using in our automated tests. Java is an Object-Oriented Programming (OOP) Language. You may have had exposure to OOP languages in the past, but if not, the concept may seem a little foreign […]
When to Automate
The first step in automation success is knowing when to automate and when not to automate. Here are some guidelines: DO automate repetitive tasks. Recently I needed to add over 600 records to our application in order to fully test a feature. Rather than add just a few records to partially test it, I created […]