fix(protocol): remove unnused strict in QSA and add it to waitForSelector docs (#8140)
Strict doesn't make sense in querySelectorAll, but it was in the protocol. And we had a strict option in ElementHandle.waitForSelector but it was not surfaced in the docs/api.
This commit is contained in:
parent
527cdfb55b
commit
943c22c9c4
|
|
@ -974,3 +974,5 @@ This method does not work across navigations, use [`method: Page.waitForSelector
|
||||||
### option: ElementHandle.waitForSelector.state = %%-wait-for-selector-state-%%
|
### option: ElementHandle.waitForSelector.state = %%-wait-for-selector-state-%%
|
||||||
|
|
||||||
### option: ElementHandle.waitForSelector.timeout = %%-input-timeout-%%
|
### option: ElementHandle.waitForSelector.timeout = %%-input-timeout-%%
|
||||||
|
|
||||||
|
### option: ElementHandle.waitForSelector.strict = %%-input-strict-%%
|
||||||
|
|
|
||||||
|
|
@ -1828,10 +1828,9 @@ export type FrameQuerySelectorResult = {
|
||||||
};
|
};
|
||||||
export type FrameQuerySelectorAllParams = {
|
export type FrameQuerySelectorAllParams = {
|
||||||
selector: string,
|
selector: string,
|
||||||
strict?: boolean,
|
|
||||||
};
|
};
|
||||||
export type FrameQuerySelectorAllOptions = {
|
export type FrameQuerySelectorAllOptions = {
|
||||||
strict?: boolean,
|
|
||||||
};
|
};
|
||||||
export type FrameQuerySelectorAllResult = {
|
export type FrameQuerySelectorAllResult = {
|
||||||
elements: ElementHandleChannel[],
|
elements: ElementHandleChannel[],
|
||||||
|
|
|
||||||
|
|
@ -1486,7 +1486,6 @@ Frame:
|
||||||
querySelectorAll:
|
querySelectorAll:
|
||||||
parameters:
|
parameters:
|
||||||
selector: string
|
selector: string
|
||||||
strict: boolean?
|
|
||||||
returns:
|
returns:
|
||||||
elements:
|
elements:
|
||||||
type: array
|
type: array
|
||||||
|
|
|
||||||
|
|
@ -754,7 +754,6 @@ export function createScheme(tChannel: (name: string) => Validator): Scheme {
|
||||||
});
|
});
|
||||||
scheme.FrameQuerySelectorAllParams = tObject({
|
scheme.FrameQuerySelectorAllParams = tObject({
|
||||||
selector: tString,
|
selector: tString,
|
||||||
strict: tOptional(tBoolean),
|
|
||||||
});
|
});
|
||||||
scheme.FrameSelectOptionParams = tObject({
|
scheme.FrameSelectOptionParams = tObject({
|
||||||
selector: tString,
|
selector: tString,
|
||||||
|
|
|
||||||
6
types/types.d.ts
vendored
6
types/types.d.ts
vendored
|
|
@ -12893,6 +12893,12 @@ interface ElementHandleWaitForSelectorOptions {
|
||||||
*/
|
*/
|
||||||
state?: "attached"|"detached"|"visible"|"hidden";
|
state?: "attached"|"detached"|"visible"|"hidden";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When true, the call requires selector to resolve to a single element. If given selector resolves to more then one
|
||||||
|
* element, the call throws an exception.
|
||||||
|
*/
|
||||||
|
strict?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by
|
* Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by
|
||||||
* using the
|
* using the
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue