In this post, I’ll be switching gears from discussing automated tests with Webdriver to discussing integration tests that are included as part of an application’s back-end Java code. In my new Software Engineer in Test position, I have been writing integration tests to test every API call we have. This means that I have dozens […]
Author: kristinjackvony
Finding an Element With Webdriver: Part III
Today we will tackle the most difficult ways to find an element: by css and xpath. These are the most difficult because it’s so easy to miss a slash or a period in the description. They are also the most difficult because they are so brittle- every time a developer makes a change to the […]
Understanding the DOM
In order to find and use web elements using By.cssSelector or By.xpath, it is very helpful to understand the DOM. The DOM (Document Object Model) is simply the interface that is used to interact with HTML and XML documents. When a JavaScript program manipulates elements on a page, it finds them using the DOM. If […]
Finding an Element With Webdriver: Part II
In my last post, I discussed how to find an element with Webdriver using the element id, class name, or name. In this post, I will discuss how to find an element using link text, partial link text, or tag name. Return to www.google.com, and look at the links on the bottom of the page. […]
Finding an Element With Webdriver- Part I
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 […]
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. […]