Skip to main content

Introduction

Author:

David Burns

Selenium Python Client Driver is a Python language binding for Selenium Remote Control (version 1.0 and 2.0).

Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are supported, as well as the Selenium 1.0 bindings. As work will progresses we’ll add more “native” drivers.

See here for more information.

Installing

Python Client

pip install -U selenium

Java Server

Download the server from http://selenium.googlecode.com/files/selenium-server-standalone-2.23.1.jar

java -jar selenium-server-standalone-2.23.1.jar

Example

from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
import time

browser = webdriver.Firefox() # Get local session of firefox
browser.get("http://www.yahoo.com") # Load page
assert "Yahoo!" in browser.title
elem = browser.find_element_by_name("p") # Find the query box
elem.send_keys("seleniumhq" + Keys.RETURN)
time.sleep(0.2) # Let the page load, will be added to the API
try:
    browser.find_element_by_xpath("//a[contains(@href,'http://seleniumhq.org')]")
except NoSuchElementException:
    assert 0, "can't find seleniumhq"
browser.close()

Documentation

Auto Generated API

Use The Source Luke!

http://code.google.com/p/selenium/source/browse/trunk/py/selenium/webdriver/remote/webdriver.py

Metadata

Release files for selenium 2.23.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for selenium 2.23.0
File Size Uploaded Provenance Actions
selenium-2.23.0.tar.gz 3.2 MB Without provenance Details for selenium-2.23.0.tar.gz

Release files / selenium-2.23.0.tar.gz

Download URL selenium-2.23.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
5f77e3fe377ceb2d43b59f1e5368c96bef5de8679e75a68222fce68606d1df27
BLAKE2b-256 checksum
How to use checksums
47d55c89d9cbdd2c3b8785fe57da7d88e1633c69fee51e10ab540ba88559dba3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for selenium 2.23.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.23.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page