Merge pull request #29848 from MaxKornilov/master

Puppeteer. Select method moved from Page to parent FrameBase class
This commit is contained in:
Ron Buckton
2018-10-27 14:06:34 -07:00
committed by GitHub
+9 -9
View File
@@ -1169,6 +1169,15 @@ export interface FrameBase extends Evalable {
*/
hover(selector: string): Promise<void>;
/**
* Triggers a `change` and `input` event once all the provided options have been selected.
* If there's no `<select>` element matching selector, the method throws an error.
* @param selector A selector to query page for.
* @param values Values of options to select. If the `<select>` has the `multiple` attribute,
* all values are considered, otherwise only the first one is taken into account.
*/
select(selector: string, ...values: string[]): Promise<string[]>;
/**
* Sets the page content.
* @param html HTML markup to assign to the page.
@@ -1472,15 +1481,6 @@ export interface Page extends EventEmitter, FrameBase {
screenshot(options?: BinaryScreenShotOptions): Promise<Buffer>;
screenshot(options?: ScreenshotOptions): Promise<string | Buffer>;
/**
* Triggers a `change` and `input` event once all the provided options have been selected.
* If there's no `<select>` element matching selector, the method throws an error.
* @param selector A selector to query page for.
* @param values Values of options to select. If the `<select>` has the `multiple` attribute,
* all values are considered, otherwise only the first one is taken into account.
*/
select(selector: string, ...values: string[]): Promise<string[]>;
/**
* Toggles bypassing page's Content-Security-Policy.
* NOTE CSP bypassing happens at the moment of CSP initialization rather then evaluation.