-
-
Couldn't load subscription status.
- Fork 1.4k
Closed
Closed
Copy link
Labels
Description
Update the "SB" context manager and "Driver" manager for the latest changes
The "SB" context manager and "Driver" manager have lots of options to keep up with the standard seleniumbase pytest options. They must be maintained to stay in sync.
For reference, here's an example of the SB context manager:
from seleniumbase import SB
with SB() as sb: # Lots of args! (Eg. headless=True)
sb.open("https://google.com/ncr")
sb.type('[name="q"]', "SeleniumBase on GitHub\n")
sb.click('a[href*="github.com/seleniumbase"]')
sb.highlight("div.Layout-main")
sb.highlight("div.Layout-sidebar")
sb.sleep(0.5)Here's the Driver Manager as a context manager:
from seleniumbase import Driver
with Driver(browser="chrome") as driver:
driver.get("https://google.com/ncr")Here's the Driver Manager as a direct import:
from seleniumbase import Driver
driver = Driver(browser="edge")
driver.get("https://google.com/ncr")