Authentication with selenium (Python)


I have the links to the admin area of my website: it is possible to launch those URIs (links) with selenium (in a given browser) without needing to authenticate previously ? If not, then how could I deal with authentication using selenium ?


Not sure what you mean but you can just use selectors and enter credentials to the authentication fields. i.e.

from selenium import webdriver driver = webdriver.Firefox() driver.get(url) driver.find_element_by_id("IDOFLOGIN").sendKeys("YOUR LOGIN") driver.find_element_by_id("PASSOFLOGIN").sendKeys("YOUR PASSWORD") driver.find_element_by_id("login button").click() # Continue

you can find element not necessarily by ID you can also you class, xpath and so on.


  • In python selenium, how does one find the visibility of an element?
  • How to resolve TypeError: object of type 'WebElement' has no len() in Python Selenium
  • Unable to locate element using selenium webdriver in python
  • How to provide credentials as user input runtime during python automation?
  • selenium new tab in chrome browser by python webdriver
  • Can we make an element of block modifier in BEM?
  • Click a checkbox with selenium-webdriver
  • Catch change event on input field dynamically added to Jquery Datatables table
  • AND selector jQuery
  • Reading a file located in a jar as java.io.File object
  • Office365 authentication without login redirection
  • OAuth2 flow for mobile app
  • New-PSSession in an Azure-runbook (ARM)
  • Merge list of objects into consistent list based on common matching attribute in Python
  • WooCommerce hook after order is updated?
  • Return to second to last URL in MVC (return View with previous filter conditions applied)?
  • Can I use Jquery to automatically find and set the width and height of a variety of images?
  • How to load Q library with Require.js?
  • Many to Many in Linq using Dapper
  • How can I prevent the need to copy strings passed to a avr-gcc C++ constructor?
  • Returning the auto incrementing value after an insert using slick
  • (Tcl/Expect) clear screen after exit
  • Scanner nextInt() and hasNextInt() problems
  • jQuery: How to AJAXify WordPress Search?
  • Trying to get the char code of ENTER key
  • Suppressing passwd when calling sqlplus from shell script
  • Combining two different ActiveRecord collections into one
  • Authentication in Play! and RestEasy
  • Abort upload large uploads after reading headers
  • Ionic 2 storage is not cleaning up on uninstall - Only for signed APK
  • Apache 2.4 and php-fpm does not trigger apache http basic auth for php pages
  • How to recover from a Spring Social ExpiredAuthorizationException
  • How can I use Kendo UI with Razor?
  • Google cloud sdk not working when python points python3
  • Matplotlib draw Spline from multiple points
  • Why winpcap requires both .lib and .dll to run?
  • Return words with double consecutive letters
  • Python: how to group similar lists together in a list of lists?
  • Error creating VM instance in Google Compute Engine
  • Busy indicator not showing up in wpf window [duplicate]