Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Navigating links using get method – Selenium Python

  • Last Updated : 10 Apr, 2020

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 navigate to any link on web using get method of Selenium Webdriver in python.

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

 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course

How to navigate links using Python Selenium

The first thing one’ll want to do with WebDriver is navigate to a link. The normal way to do this is by calling get method:
Syntax –




WebDriver will wait until the page has fully loaded (that is, the onload event has fired) before returning control to your test or script. It’s worth noting that if your page uses a lot of AJAX on load then WebDriver may not know when it has completely loaded. If you need to ensure such pages are fully loaded then you can use waits.

Project Example –
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()
# get
driver.get(" / search?q = geeksforgeeks")


Navigating links using get method

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!