---
title: "How to Integrate Google Sheets with Selenium | Smart Data"
url: https://www.smartdata.net/blog/integrating-googlesheets-with-selenium
description: "How to integrate Google Sheets with Selenium for cloud-based test data: configure the APIs, set up OAuth credentials and run data-driven tests from a sheet."
source: "Smart Data (smartdata.net). Markdown copy of the page; the HTML page is canonical."
---

Informational

# How to Integrate Google Sheets with Selenium

Jay Brown

Business Development October 5, 2020 3 min read

On this page

- Some of the key advantages of using Google Sheets:

Share

A guide from Smart Data

The AI Enablement Guide

Where your data stands, and which AI use cases it can support today.

[A guide from Smart Data The AI Enablement Guide Where your data stands, and which AI use cases it can support today.…](https://www.smartdata.net/ai-enablement)

Microsoft Excel is easily one of the most versatile and essential software in Test Automation framework to manage the test data and track the status back. But because Excel is mainly used on individual computers, it is challenging for users to access their documents from anywhere or to collaborate with their team in real time. Emailing files back and forth can get confusing and no one is sure which version is the right one.

Google Sheets is cloud-based spreadsheet software is the best alternatives available if you are working on the Data-driven framework.

In this article, we going to use Google spreadsheets as the data source to read the data from Selenium and pass on to a website.

## Some of the key advantages of using Google Sheets:

- Easy to use
- Built for collaboration
- Built-in Version Control
- Better visibility
- Access to your test data from any computer

### Pre-Requisites:

- Java 1.7 or greater
- Access to the internet and a web browser
- A Google account with Google Drive enabled

#### Configure the google drive, OAuth account, Service account, Shared google sheet

- Login to your Gmail account and open the URL [https://console.developers.google.com/](https://console.developers.google.com/)
- Create a new project.

**3. Then after you need to enable google sheets API library**

- Navigate to Library
- Search for API “Google sheets API”
- Enable “Google sheets API”

**4. After successful Google Sheets API enabled, the screen looks like this.**

**5. Create OAuth Client ID, create Credentials → OAuth client ID**

**6. Fill the details and complete the OAuth client ID.**

**7. After creating OAuth key, it will display the Client ID and click the OK button. Then after the download the JSON file (Download JSON) button to the right of the client ID.**

**8. Rename the Jason file to json and copy to project directory.**

**9. Then after create Service account from create Credentials à Service account.**

**10. Create a Google sheet with login credentials to pass on to a website. Copy the document ID from the URL:** https://docs.google.com/spreadsheets/d/<document ID>/edit#gid=0

**11. Share the file with service account (xxx-developer.gsserviceaccount.com) which you have created above and give editor access.**

### Google Sheets integration with Selenium

So far, we have configured the google drive, OAuth account, Service account, Shared google sheet. It’s time for the integration.

**Download the following libraries and add them to your java project.**

- Download google-api-java-client jars from – [http://search.maven.org/remotecontent?filepath=com/google/api-client/google-api-client-assembly/1.20.0/google-api-client-assembly-1.20.0-1.20.0.zip](http://search.maven.org/remotecontent?filepath=com/google/api-client/google-api-client-assembly/1.20.0/google-api-client-assembly-1.20.0-1.20.0.zip)
- Extract the downloaded folder and add the following jars in your project:google-api-client-1.20.0.jargoogle-api-client-jackson2-1.20.0.jargoogle-http-client-1.20.0.jargoogle-oauth-client-1.20.0.jargoogle-oauth-client-java6-1.20.0.jargoogle-oauth-client-jetty-1.20.0.jarjetty-6.1.26.jarjetty-util-6.1.26.jar

**Code Snippet for reading the data from Google Sheet:**

**Code Snippet for passing the data to a web application:**

Keep reading

## Related posts

### Snowflake Cortex AI: What It Is, What It Isn't, and Whether You Need It

Riel St. Amand · Mar 10, 2026

[Snowflake Cortex AI: What It Is, What It Isn't, and Whether You Need It](https://www.smartdata.net/blog/snowflake-cortex-ai)

### Context is King: Why AI Coding Assistants Fail Without It (And How Devs Can Help Them Succeed)

Darick Dunaway · Sep 18, 2025

[Context is King: Why AI Coding Assistants Fail Without It (And How Devs Can Help Them Succeed)](https://www.smartdata.net/blog/context-is-king-ai-coding-assistants)

### Azure AI Content Understanding is Transforming Invoice, Sales & Claims Processing

Chris St. Amand · Aug 19, 2025

[Azure AI Content Understanding is Transforming Invoice, Sales & Claims Processing](https://www.smartdata.net/blog/azure-ai-content-understanding-transforming-invoice-claims-processing)

Go further

## Not sure your data is ready for AI?

The guide covers data maturity, use cases by readiness level and industry perspectives, so you can see where your platform stands before you pick a model.
