https://github.com/mdmintz/sbvirtualdisplay
A customized pyvirtualdisplay for use with SeleniumBase automation.
https://github.com/mdmintz/sbvirtualdisplay
seleniumbase
Last synced: 4 months 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 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-16T15:01:23.000Z (about 1 year ago)
- Last Synced: 2025-09-16T21:46:05.742Z (5 months ago)
- Topics: seleniumbase
- Language: Python
- Homepage:
- Size: 55.7 KB
- Stars: 18
- Watchers: 3
- Forks: 3
- 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://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 Display
display = 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.