class: browsertype
[27:14] (extern: com.lehman.aussom.ABrowserType) extends: object
The browsertype class represents a specific browser type (Chromium, Firefox, or WebKit). It provides methods to launch new browser instances or connect to existing ones. Instances are obtained via playwright.chromium(), playwright.firefox(), or playwright.webkit().
Methods
-
launch ()
Launches a new browser instance with default options.
- @r
Anew browser object.
- @r
-
launchHeadless (
bool Headless)Launches a new browser instance in headless mode based on the provided flag.
- @p
Headlessis a bool that when true runs the browser without a visible UI. - @r
Anew browser object.
- @p
-
launchPersistentContext (
string UserDataDir)Launches a new persistent browser context with the provided user data directory. Unlike launch(), this creates a BrowserContext directly and persists cookies, cache, and local storage between sessions.
- @p
UserDataDiris a string path to the directory where the browser profile data will be stored. - @r
Anew browsercontext object backed by a persistent profile.
- @p
-
launchPersistentContextHeadless (
string UserDataDir, bool Headless)Launches a new persistent browser context in headless or headed mode.
- @p
UserDataDiris a string path to the directory where the browser profile data will be stored. - @p
Headlessis a bool that when true runs the browser without a visible UI. - @r
Anew browsercontext object backed by a persistent profile.
- @p
-
name ()
Returns the browser type name string (e.g. "chromium", "firefox", "webkit").
- @r
Astring with the browser type name.
- @r
-
executablePath ()
Returns the path to the browser executable that will be used when launching this browser type.
- @r
Astring with the path to the browser executable.
- @r