-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Learning Selenium Testing Tools - Third Edition - Third Edition
By :
In this chapter, we will look at how to find elements on the page using the WebDriver API. One of the things that we learned in the previous chapter was that WebDriver and its architecture have a major component called driver. This has the commands to find elements.
Let's start with the different commands. We begin with the helper commands and then move on to the more generic commands, which take different types of objects. We will finish the chapter with some helpful techniques when interacting with element finding.
Two major learning points are as follows:
So let's get on with it. When working with the following examples, we are going to assume that you have instantiated a WebDriver object by using the following code:
WebDriver driver = new FirefoxDriver();
You can use the following example class with TestNG. The test is a stub that...
Change the font size
Change margin width
Change background colour