playwright-core
Advanced tools
Comparing version 0.11.1-next.1583975195910 to 0.11.1-next.1583976325223
@@ -113,3 +113,3 @@ /** | ||
finished(): Promise<Error | null>; | ||
buffer(): Promise<platform.BufferType>; | ||
body(): Promise<platform.BufferType>; | ||
text(): Promise<string>; | ||
@@ -116,0 +116,0 @@ json(): Promise<object>; |
@@ -206,3 +206,3 @@ "use strict"; | ||
} | ||
buffer() { | ||
body() { | ||
if (!this._contentPromise) { | ||
@@ -218,3 +218,3 @@ this._contentPromise = this._finishedPromise.then(async (error) => { | ||
async text() { | ||
const content = await this.buffer(); | ||
const content = await this.body(); | ||
return content.toString('utf8'); | ||
@@ -221,0 +221,0 @@ } |
@@ -52,3 +52,3 @@ /** | ||
}): Promise<BrowserServer>; | ||
launchPersistent(userDataDir: string, options?: LaunchOptions): Promise<BrowserContext>; | ||
launchPersistentContext(userDataDir: string, options?: LaunchOptions): Promise<BrowserContext>; | ||
connect(options: ConnectOptions): Promise<Browser>; | ||
@@ -55,0 +55,0 @@ downloadBrowserIfNeeded(progress?: OnProgressCallback): Promise<void>; |
@@ -37,3 +37,3 @@ /** | ||
}): Promise<BrowserServer>; | ||
launchPersistent(userDataDir: string, options?: LaunchOptions): Promise<BrowserContext>; | ||
launchPersistentContext(userDataDir: string, options?: LaunchOptions): Promise<BrowserContext>; | ||
private _launchServer; | ||
@@ -40,0 +40,0 @@ connect(options: ConnectOptions): Promise<CRBrowser>; |
@@ -45,3 +45,3 @@ "use strict"; | ||
if (options && options.userDataDir) | ||
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistent` instead'); | ||
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistentContext` instead'); | ||
const { browserServer, transport } = await this._launchServer(options, 'local'); | ||
@@ -55,3 +55,3 @@ const browser = await crBrowser_1.CRBrowser.connect(transport, false, options && options.slowMo); | ||
} | ||
async launchPersistent(userDataDir, options) { | ||
async launchPersistentContext(userDataDir, options) { | ||
const { timeout = 30000 } = options || {}; | ||
@@ -58,0 +58,0 @@ const { transport } = await this._launchServer(options, 'persistent', userDataDir); |
@@ -38,3 +38,3 @@ /** | ||
}): Promise<BrowserServer>; | ||
launchPersistent(userDataDir: string, options?: LaunchOptions): Promise<BrowserContext>; | ||
launchPersistentContext(userDataDir: string, options?: LaunchOptions): Promise<BrowserContext>; | ||
private _launchServer; | ||
@@ -41,0 +41,0 @@ connect(options: ConnectOptions): Promise<FFBrowser>; |
@@ -53,3 +53,3 @@ "use strict"; | ||
if (options && options.userDataDir) | ||
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistent` instead'); | ||
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistentContext` instead'); | ||
const browserServer = await this._launchServer(options, 'local'); | ||
@@ -67,3 +67,3 @@ const browser = await platform.connectToWebsocket(browserServer.wsEndpoint(), transport => { | ||
} | ||
async launchPersistent(userDataDir, options) { | ||
async launchPersistentContext(userDataDir, options) { | ||
const { timeout = 30000 } = options || {}; | ||
@@ -70,0 +70,0 @@ const browserServer = await this._launchServer(options, 'persistent', userDataDir); |
@@ -38,3 +38,3 @@ /** | ||
}): Promise<BrowserServer>; | ||
launchPersistent(userDataDir: string, options?: LaunchOptions): Promise<BrowserContext>; | ||
launchPersistentContext(userDataDir: string, options?: LaunchOptions): Promise<BrowserContext>; | ||
private _launchServer; | ||
@@ -41,0 +41,0 @@ connect(options: ConnectOptions): Promise<WKBrowser>; |
@@ -56,3 +56,3 @@ "use strict"; | ||
if (options && options.userDataDir) | ||
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistent` instead'); | ||
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistentContext` instead'); | ||
const { browserServer, transport } = await this._launchServer(options, 'local'); | ||
@@ -66,3 +66,3 @@ const browser = await wkBrowser_1.WKBrowser.connect(transport, options && options.slowMo); | ||
} | ||
async launchPersistent(userDataDir, options) { | ||
async launchPersistentContext(userDataDir, options) { | ||
const { timeout = 30000 } = options || {}; | ||
@@ -69,0 +69,0 @@ const { transport } = await this._launchServer(options, 'persistent', userDataDir); |
{ | ||
"name": "playwright-core", | ||
"version": "0.11.1-next.1583975195910", | ||
"version": "0.11.1-next.1583976325223", | ||
"description": "A high-level API to automate web browsers", | ||
@@ -5,0 +5,0 @@ "repository": "github:Microsoft/playwright", |
Sorry, the diff of this file is too big to display
2448506