class: browser
[27:14] (extern: com.lehman.aussom.ABrowser) extends: object
The browser class represents a launched browser instance (Chromium, Firefox, or WebKit). Instances are obtained by calling browsertype.launch() or browsertype.launchHeadless(). Each browser may own multiple browser contexts. Call close() when done to release resources.
Methods
-
newPage ()
Creates a new page in a new browser context and returns it. This is a convenience method equivalent to newContext().newPage().
- @r
Anew page object.
- @r
-
newContext ()
Creates a new isolated browser context within this browser. Each context has its own cookies, local storage, and permissions.
- @r
Anew browsercontext object.
- @r
-
close ()
Closes the browser and all of its pages and contexts.
- @r
Thisobject.
- @r
-
version ()
Returns the browser version string as reported by the browser.
- @r
Astring with the browser version (e.g. "120.0.6099.71").
- @r
-
isConnected ()
Returns whether the browser process is currently connected and alive.
- @r
Abool - true if the browser is connected.
- @r
-
contexts ()
Returns a list of all open browser contexts owned by this browser.
- @r
Alist of browsercontext objects.
- @r
-
browserType ()
Returns the browser type that was used to launch this browser instance.
- @r
Abrowsertype object.
- @r