Skip to main content

Extends Selenium WebDriver classes to include the request function from the Requests library, while doing all the needed cookie and request headers handling.

Project description

Extends Selenium WebDriver classes to include the request function from the Requests library, while doing all the needed cookie and request headers handling.

Details

Before the actual request is made, a local HTTP server is started that serves a single request made by the webdriver instance to get the “standard” HTTP request headers sent by this webdriver; these are cached (only happens once during its lifetime) and later used in conjunction with the Requests library to make the requests look identical to those that would have been sent by the webdriver. Cookies held by the webdriver instance are added to the request headers and those returned in a response automatically set for the webdriver instance.

Installation

pip install selenium-requests

Usage

# Import any WebDriver class that you would usually import from
# selenium.webdriver from the seleniumrequests module
from seleniumrequests import Firefox


webdriver = Firefox()
response = webdriver.request('GET', 'http://google.com/')
print(response)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

selenium-requests-1.0.8.zip (11.4 kB view details)

Uploaded Source

File details

Details for the file selenium-requests-1.0.8.zip.

File metadata

File hashes

Hashes for selenium-requests-1.0.8.zip
Algorithm Hash digest
SHA256 a89dd41e2c0a3e20b69d6f5411d497d314f8ff8b7d3befb4c2ead88c6f1e982b
MD5 d7ee46718b7fc1696d51b97896b05059
BLAKE2b-256 7f6eb8ab1192eb77ab2d7f84bc9ba95708d445f1929d861a1422513d75f7ff14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page