{"record":{"id":"77c4dd1faf94135b","repo":"microsoft/playwright","slug":"options-visibility-is-not-supported-did-you-mean","errorCode":null,"errorMessage":"options.visibility is not supported, did you mean options.state?","messagePattern":"options\\.visibility is not supported, did you mean options\\.state\\?","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/client/frame.ts","lineNumber":242,"sourceCode":"    return parseResult(result.value);\n  }\n\n  async _evaluateExposeUtilityScript<R, Arg>(pageFunction: structs.PageFunction<Arg, R>, arg?: Arg): Promise<R> {\n    assertMaxArguments(arguments.length, 2);\n    const result = await this._channel.evaluateExpression({ expression: String(pageFunction), isFunction: typeof pageFunction === 'function', arg: serializeArgument(arg) }, kNoTimeout);\n    return parseResult(result.value);\n  }\n\n  async $(selector: string, options?: { strict?: boolean }): Promise<ElementHandle<SVGElement | HTMLElement> | null> {\n    const result = await this._channel.querySelector({ selector, ...options }, kNoTimeout);\n    return ElementHandle.fromNullable(result.element) as ElementHandle<SVGElement | HTMLElement> | null;\n  }\n\n  waitForSelector(selector: string, options: channels.FrameWaitForSelectorOptions & TimeoutOptions & { state: 'attached' | 'visible' }): Promise<ElementHandle<SVGElement | HTMLElement>>;\n  waitForSelector(selector: string, options?: channels.FrameWaitForSelectorOptions & TimeoutOptions): Promise<ElementHandle<SVGElement | HTMLElement> | null>;\n  async waitForSelector(selector: string, options: channels.FrameWaitForSelectorOptions & TimeoutOptions = {}): Promise<ElementHandle<SVGElement | HTMLElement> | null> {\n    if ((options as any).visibility)\n      throw new Error('options.visibility is not supported, did you mean options.state?');\n    if ((options as any).waitFor && (options as any).waitFor !== 'visible')\n      throw new Error('options.waitFor is not supported, did you mean options.state?');\n    const result = await this._channel.waitForSelector({ selector, ...options }, this._timeout(options));\n    return ElementHandle.fromNullable(result.element) as ElementHandle<SVGElement | HTMLElement> | null;\n  }\n\n  async dispatchEvent(selector: string, type: string, eventInit?: any, options: channels.FrameDispatchEventOptions & TimeoutOptions = {}): Promise<void> {\n    await this._channel.dispatchEvent({ selector, type, eventInit: serializeArgument(eventInit), ...options }, this._timeout(options));\n  }\n\n  async $eval<R, Arg>(selector: string, pageFunction: structs.PageFunctionOn<Element, Arg, R>, arg?: Arg): Promise<R> {\n    assertMaxArguments(arguments.length, 3);\n    const result = await this._channel.evalOnSelector({ selector, expression: String(pageFunction), isFunction: typeof pageFunction === 'function', arg: serializeArgument(arg) }, kNoTimeout);\n    return parseResult(result.value);\n  }\n\n  async $$eval<R, Arg>(selector: string, pageFunction: structs.PageFunctionOn<Element[], Arg, R>, arg?: Arg): Promise<R> {\n    assertMaxArguments(arguments.length, 3);","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/client/frame.ts#L224-L260","documentation":"Error \"options.visibility is not supported, did you mean options.state?\" thrown in microsoft/playwright.","triggerScenarios":"Thrown at packages/playwright-core/src/client/frame.ts:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}