Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdmintz/sbvirtualdisplay
A customized pyvirtualdisplay for use with SeleniumBase automation.
https://github.com/mdmintz/sbvirtualdisplay
seleniumbase
Last synced: 19 days ago
JSON representation
A customized pyvirtualdisplay for use with SeleniumBase automation.
- Host: GitHub
- URL: https://github.com/mdmintz/sbvirtualdisplay
- Owner: mdmintz
- License: bsd-2-clause
- Created: 2021-07-16T17:12:37.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-16T16:34:54.000Z (about 2 months ago)
- Last Synced: 2024-10-14T09:47:10.189Z (about 1 month ago)
- Topics: seleniumbase
- Language: Python
- Homepage:
- Size: 46.9 KB
- Stars: 14
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# sbVirtualDisplay (💻) [![](https://img.shields.io/pypi/v/sbvirtualdisplay.svg)](https://pypi.python.org/pypi/sbvirtualdisplay)
A customized [pyvirtualdisplay](https://github.com/ponty/PyVirtualDisplay) for use with [SeleniumBase](https://github.com/seleniumbase/SeleniumBase) automation.
## Usage example:
```python
from sbvirtualdisplay import Displaydisplay = Display(visible=0, size=(1440, 1880))
display.start()# Run browser tests in a headless environment
display.stop()
```### Or as a context manager:
```python
with Display(visible=0, size=(1440, 1880)):
# Run browser tests in a headless environment
...
```## When to use:
If you need to run browser tests on a headless machine (such as a Linux backend), and you can't use a browser's headless mode (such as Chrome's headless mode), then this may help. For example, Chrome does not allow extensions in headless mode, so if you need to run automated tests on a headless Linux machine and you need to use Chrome extensions, then this will let you run those tests using a virtual display.
## More info:
* [Xvfb](https://en.wikipedia.org/wiki/Xvfb) is required for this to work.