class Playwright::Browser
def close(reason: nil)
**NOTE**: This is similar to force quitting the browser. Therefore, you should call [`method: BrowserContext.close`] on any `BrowserContext`'s you explicitly created earlier with [`method: Browser.newContext`] **before** calling [`method: Browser.close`].
browser server.
In case this browser is connected to, clears all created contexts belonging to this browser and disconnects from the
were opened).
In case this browser is obtained using [`method: BrowserType.launch`], closes the browser and all of its pages (if any
def close(reason: nil) wrap_impl(@impl.close(reason: unwrap_impl(reason))) end