Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Selenium Essentials
  • Table Of Contents Toc
  • Feedback & Rating feedback
Selenium Essentials

Selenium Essentials

By : Sams
5 (1)
close
close
Selenium Essentials

Selenium Essentials

5 (1)
By: Sams

Overview of this book

If you are a developer who wants to migrate from Selenium RC or any other automation tool to Selenium WebDriver, then this book is for you. Knowledge of automation tools is necessary to follow the examples in this book.
Table of Contents (7 chapters)
close
close

Properties file Data-Driven framework


The properties file is similar to the text file but with the .properties file extension. It is widely used in Java apps to store and configure parameters.

Data-Driven testing using the properties file as the data source is feasible on Selenium WebDriver to handle small data. Create a .properties file and store the keywords with a constant key (search). In Eclipse, open the project, right-click on the src folder and select New| Other... | General | File. Name the file with the.properties extension, for example, config.properties.

Let's see an example of how to read values from the properties file:

Build a test class that depicts a simple Google search by reading a series of keywords from the .properties file:

import java.util.ResourceBundle;
import java.util.StringTokenizer;
import java.util.concurrent.TimeUnit;

public class classname {
  private WebDriver driver;
  private String baseUrl;

  @BeforeTest
  public void setUp() throws Exception {
    driver...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Selenium Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon