Skip to content
Related Articles

Related Articles

Search Google Using Python Selenium

View Discussion
Improve Article
Save Article
  • Difficulty Level : Expert
  • Last Updated : 04 Jan, 2021

Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. Through Selenium Python API you can access all functionalities of Selenium WebDriver in an intuitive way. This article illustrates about how to use Selenium Python to write your first program with Selenium to Search Google Using Python Selenium.

If you have not installed Selenium and its components yet, install them from here – Selenium Python Introduction and Installation.

How to search google using Python Selenium

Google search has a URL where you can append your keywords and it will search the keyword for you. For example – “”, this will search gfg on the same manner we arbitrarily provide the keyword we want to search or take input from user. This is an example program to understand how Selenium works.

After you have installed Selenium, create a file called as –
Program –

# Python program to demonstrate
# selenium
# import webdriver
from selenium import webdriver
# create webdriver object
driver = webdriver.Firefox()
# enter keyword to search
keyword = "geeksforgeeks"
# get
driver.get(" / search?q ="+keyword)



My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!