Skip to content

First Script#

When you have installed relevant packages, you're ready to go. Simply type:

Python
1
2
3
4
5
6
from browserist import Browser

browser = Browser()
browser.open.url("https://example.com")
browser.wait.seconds(5)
browser.quit()

Or use the built-in context manager so the browser automatically closes when done or if an error occurs:

Python
1
2
3
4
5
from browserist import Browser

with Browser() as browser:
    browser.open.url("https://example.com")
    browser.wait.seconds(5)