Select method moved to FrameBase

This commit is contained in:
MaxKornilov
2018-10-18 15:37:04 +03:00
committed by GitHub
parent ade3a164f3
commit 6396ec36c8
+9 -9
View File
@@ -1168,6 +1168,15 @@ export interface FrameBase extends Evalable {
* @param selector A selector to search for element to hover. If there are multiple elements satisfying the selector, the first will be hovered.
*/
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.
@@ -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.