Skip to content

Commit 7f8eefc

Browse files
committed
Support Selenium 4.1.0
1 parent 6cc85ab commit 7f8eefc

File tree

9 files changed

+389
-244
lines changed

9 files changed

+389
-244
lines changed

.gitignore

+18-1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ ipython_config.py
9494
# install all needed dependencies.
9595
#Pipfile.lock
9696

97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
97104
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
98105
__pypackages__/
99106

@@ -137,12 +144,22 @@ dmypy.json
137144
# Cython debug symbols
138145
cython_debug/
139146

147+
# PyCharm
148+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
149+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
150+
# and can be added to the global gitignore or merged into this file. For a more nuclear
151+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
152+
#.idea/
153+
140154
.vscode/*
141155
!.vscode/settings.json
142156
!.vscode/tasks.json
143157
!.vscode/launch.json
144158
!.vscode/extensions.json
145-
*.code-workspace
159+
!.vscode/*.code-snippets
146160

147161
# Local History for Visual Studio Code
148162
.history/
163+
164+
# Built Visual Studio Code Extensions
165+
*.vsix

MANIFEST.in

-1
This file was deleted.

README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
Selenium Requests
22
=================
3-
Extends Selenium WebDriver classes to include the [request](http://docs.python-requests.org/en/latest/api/#requests.request) function from the [Requests](http://python-requests.org/) library, while doing all the needed cookie and request headers handling.
3+
Extends Selenium WebDriver classes to include the
4+
[request](http://docs.python-requests.org/en/latest/api/#requests.request) function from the
5+
[Requests](http://python-requests.org/) library, while doing all the needed cookie and request headers handling.
46

5-
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.
7+
Before the actual request is made, a local HTTP server is started that serves a single request made by the webdriver
8+
instance to get the "standard" HTTP request headers sent by this webdriver; these are cached (only happens once during
9+
its lifetime) and later used in conjunction with the Requests library to make the requests look identical to those that
10+
would have been sent by the webdriver. Cookies held by the webdriver instance are added to the request headers and those
11+
returned in a response automatically set for the webdriver instance.
612

713

814
Features
915
--------
1016
* Determines and sends the default HTTP headers (User-Agent etc.) for the chosen WebDriver
1117
* Manages cookies bidirectionally between requests and Selenium
12-
* Switches to already existing window handles or temporarily creates them to work with the webdriver's cookies when making a request
18+
* Switches to already existing window handles or temporarily creates them to work with the webdriver's cookies when
19+
making a request
1320
* All operations preserve the original state of the WebDriver (active window handle and window handles)
14-
* Tested to work with Selenium (3.0.1) using Mozilla Firefox (49.0.2), Google Chrome (54.0.2840.71) and PhantomJS (2.1.1)
21+
* Tested to work with Selenium (v4.1.0) using Mozilla Firefox (v97.0) and Chromium (v98.0.4758.80)
1522

1623

1724
Usage

0 commit comments

Comments
 (0)