Documentation ¶
Index ¶
- Constants
- func GetBrowserContextPages(ctx playwright.BrowserContext) (pages []playwright.Page)
- func GetBrowserPages(browser playwright.Browser) (pages []playwright.Page)
- func LaunchBrowser(browserName string, driverDir string, installFlag bool, ...) (pw *playwright.Playwright, browser playwright.Browser, err error)
Constants ¶
View Source
const ( BrowserNameChromium = "chromium" BrowserNameFirefox = "firefox" BrowserNameWebkit = "webkit" )
Variables ¶
This section is empty.
Functions ¶
func GetBrowserContextPages ¶
func GetBrowserContextPages(ctx playwright.BrowserContext) (pages []playwright.Page)
GetBrowserContextPages
@param ctx 不能为nil @return 有可能len(pages) == 0
func GetBrowserPages ¶
func GetBrowserPages(browser playwright.Browser) (pages []playwright.Page)
GetBrowserPages
@param browser 不能为nil @return 有可能len(pages) == 0
func LaunchBrowser ¶
func LaunchBrowser(browserName string, driverDir string, installFlag bool, launchOptions *playwright.BrowserTypeLaunchOptions) (pw *playwright.Playwright, browser playwright.Browser, err error)
LaunchBrowser
@param browserName 浏览器名称 @param driverDir 用于存放浏览器和操作系统的依赖(初次执行会下载,会有点慢) @param launchOptions 可以为nil,将采用默认值(headless == true)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.