{"record":{"id":"12e5a73c6036e5ca","repo":"vitest-dev/vitest","slug":"method-getbyplaceholder-is-not-supported-by-the","errorCode":null,"errorMessage":"Method \"getByPlaceholder\" is not supported by the \"${provider}\" provider.","messagePattern":"Method \"getByPlaceholder\" is not supported by the \"(.+?)\" provider\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/browser/src/client/tester/context.ts","lineNumber":452,"sourceCode":"        }],\n        error,\n      )\n    })\n  },\n  getByRole() {\n    throw new Error(`Method \"getByRole\" is not supported by the \"${provider}\" provider.`)\n  },\n  getByLabelText() {\n    throw new Error(`Method \"getByLabelText\" is not supported by the \"${provider}\" provider.`)\n  },\n  getByTestId() {\n    throw new Error(`Method \"getByTestId\" is not supported by the \"${provider}\" provider.`)\n  },\n  getByAltText() {\n    throw new Error(`Method \"getByAltText\" is not supported by the \"${provider}\" provider.`)\n  },\n  getByPlaceholder() {\n    throw new Error(`Method \"getByPlaceholder\" is not supported by the \"${provider}\" provider.`)\n  },\n  getByText() {\n    throw new Error(`Method \"getByText\" is not supported by the \"${provider}\" provider.`)\n  },\n  getByTitle() {\n    throw new Error(`Method \"getByTitle\" is not supported by the \"${provider}\" provider.`)\n  },\n  elementLocator() {\n    throw new Error(`Method \"elementLocator\" is not supported by the \"${provider}\" provider.`)\n  },\n  frameLocator() {\n    throw new Error(`Method \"frameLocator\" is not supported by the \"${provider}\" provider.`)\n  },\n  extend(methods) {\n    for (const key in methods) {\n      (page as any)[key] = (methods as any)[key].bind(page)\n    }\n    return page","sourceCodeStart":434,"sourceCodeEnd":470,"githubUrl":"https://github.com/vitest-dev/vitest/blob/1fa9837ec26533512fdcad8baebf249771bd340a/packages/browser/src/client/tester/context.ts#L434-L470","documentation":"page.getByPlaceholder is a locator method implemented only by full providers. The default page stub throws with the active provider name. Placeholder-based location requires a provider selector engine; preview falls back to manual DOM queries.","triggerScenarios":"Calling page.getByPlaceholder('Search') while provider is 'preview' or a custom provider lacking the method.","commonSituations":"Form validation tests ported from Playwright/RTL; default provider config; missing provider install.","solutions":["Set test.browser.provider to 'playwright' or 'webdriverio' and install the package.","Under preview, use document.querySelector('[placeholder=\"Search\"]').","Register the method via page.extend in a custom provider."],"exampleFix":"// before\nconst q = page.getByPlaceholder('Search')\n// after (preview provider)\nconst q = document.querySelector('input[placeholder=\"Search\"]')!","handlingStrategy":"validation","validationCode":"if (getBrowserState().provider === 'preview') {\n  document.querySelector('[placeholder=\"Search\"]')\n} else {\n  page.getByPlaceholder('Search')\n}","typeGuard":"function supportsLocators(): boolean {\n  return ['playwright', 'webdriverio'].includes(getBrowserState().provider ?? '')\n}","tryCatchPattern":null,"preventionTips":["Configure a full provider for placeholder-based location.","Use [placeholder=\"...\"] selectors under preview.","Wrap provider-specific queries in a helper."],"tags":["browser","locators","provider","preview"],"backgroundTag":null,"analyzedSha":"1fa9837ec26533512fdcad8baebf249771bd340a","analyzedAt":"2026-08-11T16:11:39.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}