playwright-core
Advanced tools
Comparing version 0.11.1-next.1583512728058 to 0.11.1-next.1583521768218
@@ -138,2 +138,6 @@ /** | ||
} & types.WaitForOptions & types.NavigateOptions): Promise<void>; | ||
press(selector: string, key: string, options?: { | ||
delay?: number; | ||
text?: string; | ||
} & types.NavigateOptions & types.WaitForOptions & types.NavigateOptions): Promise<void>; | ||
check(selector: string, options?: types.WaitForOptions & types.NavigateOptions): Promise<void>; | ||
@@ -140,0 +144,0 @@ uncheck(selector: string, options?: types.WaitForOptions & types.NavigateOptions): Promise<void>; |
@@ -723,2 +723,7 @@ "use strict"; | ||
} | ||
async press(selector, key, options) { | ||
const handle = await this._optionallyWaitForSelectorInUtilityContext(selector, options); | ||
await handle.press(key, options); | ||
handle.dispose(); | ||
} | ||
async check(selector, options) { | ||
@@ -725,0 +730,0 @@ const handle = await this._optionallyWaitForSelectorInUtilityContext(selector, options); |
@@ -126,3 +126,3 @@ /** | ||
mainFrame(): frames.Frame; | ||
frame(options: { | ||
frame(options: string | { | ||
name?: string; | ||
@@ -199,2 +199,6 @@ url?: types.URLMatch; | ||
} & types.WaitForOptions & types.NavigateOptions): Promise<void>; | ||
press(selector: string, key: string, options?: { | ||
delay?: number; | ||
text?: string; | ||
} & types.NavigateOptions & types.WaitForOptions & types.NavigateOptions): Promise<void>; | ||
check(selector: string, options?: types.WaitForOptions & types.NavigateOptions): Promise<void>; | ||
@@ -201,0 +205,0 @@ uncheck(selector: string, options?: types.WaitForOptions & types.NavigateOptions): Promise<void>; |
@@ -134,7 +134,9 @@ "use strict"; | ||
frame(options) { | ||
helper_1.assert(options.name || options.url, 'Either name or url matcher should be specified'); | ||
const name = helper_1.helper.isString(options) ? options : options.name; | ||
const url = helper_1.helper.isObject(options) ? options.url : undefined; | ||
helper_1.assert(name || url, 'Either name or url matcher should be specified'); | ||
return this.frames().find(f => { | ||
if (options.name) | ||
return f.name() === options.name; | ||
return platform.urlMatches(f.url(), options.url); | ||
if (name) | ||
return f.name() === name; | ||
return platform.urlMatches(f.url(), url); | ||
}) || null; | ||
@@ -339,2 +341,5 @@ } | ||
} | ||
async press(selector, key, options) { | ||
return this.mainFrame().press(selector, key, options); | ||
} | ||
async check(selector, options) { | ||
@@ -341,0 +346,0 @@ return this.mainFrame().check(selector, options); |
{ | ||
"name": "playwright-core", | ||
"version": "0.11.1-next.1583512728058", | ||
"version": "0.11.1-next.1583521768218", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2449206
57501