Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Feb 7, 2024
1 parent 43d9023 commit c390e69
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ python -m pip install open-webdriver
```

```python
import os
from open_webdriver import open_webdriver
# Needed or else exceptions will be thrown on when executed from github actions.
IS_HEADLESS = os.environ.get("GITHUB_ACTIONS") == "true"

def main():
with open_webdriver(headless=False) as driver:
with open_webdriver(headless=IS_HEADLESS) as driver:
# All Chromium / web driver dependencies are now installed.
driver.get("https://www.google.com")
assert driver.title == "Google"
Expand Down

0 comments on commit c390e69

Please sign in to comment.