A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://playwright.bootcss.com/python/docs/api/class-browser below:

Browser | Playwright

Version: 1.8.0

Browser

A Browser is created via browser_type.launch(**kwargs). An example of using a Browser to create a Page:

browser.on("disconnected")#

Emitted when Browser gets disconnected from the browser application. This might happen because of one of the following:

browser.close()#

In case this browser is obtained using browser_type.launch(**kwargs), closes the browser and all of its pages (if any were opened).

In case this browser is connected to, clears all created contexts belonging to this browser and disconnects from the browser server.

The Browser object itself is considered to be disposed and cannot be used anymore.

browser.contexts#

Returns an array of all open browser contexts. In a newly created browser, this will return zero browser contexts.

browser.is_connected()#

Indicates that the browser is connected.

browser.new_context(**kwargs)#

Creates a new browser context. It won't share cookies/cache with other browser contexts.

browser.new_page(**kwargs)#

Creates a new page in a new browser context. Closing this page will close the context as well.

This is a convenience API that should only be used for the single-page scenarios and short snippets. Production code and testing frameworks should explicitly create browser.new_context(**kwargs) followed by the browser_context.new_page() to control their exact life times.

browser.version#

Returns the browser version.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4