
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
ivya is a fork of Playwright's locator resolution. It is only available in the browser or browser-like environments.
getBy* selectors helpersimport { Ivya, getByRoleSelector } from 'ivya'
// Ivya is a singleton, so it will always return the same instance
const ivya = Ivya.create({
browser: 'chromium',
testIdAttribute: 'data-test-id',
})
// using locator selector (a string)
const element = ivya.queryLocatorSelector(
getByRoleSelector('button', { name: 'Click Me!' })
)
// using a wrapper function
const element = ivya.queryByRole('button', { name: 'Click Me!' })
const elements = ivya.queryAllByRole('button', { name: 'Click Me!' })
// using Playwright selectors
const element = ivya.queryLocatorSelector('text=Click Me!')
const element = ivya.queryLocatorSelector('css=button[data-click]')
// using parsed selector (good for caching)
const selector = ivya.parseSelector(
getByRoleSelector('button', { name: 'Click Me!' })
)
const elements = ivya.querySelector(selector, document.body, false)
All query methods follow the same rules described in the Playwright documentation, but return an HTML element instead of a locator.
ivya.queryByRole(name: string, options?: ByRoleOptions): Element | nullivya.queryByTestId(name: string): Element | nullivya.queryByLabelText(matcher: string | RegExp, options?: { exact?: boolean }): Element | nullivya.queryByText(matcher: string | RegExp, options?: { exact?: boolean }): Element | nullivya.queryByTitle(matcher: string | RegExp, options?: { exact?: boolean }): Element | nullivya.queryByPlaceholder(matcher: string | RegExp, options?: { exact?: boolean }): Element | nullivya.queryByAltText(matcher: string | RegExp, options?: { exact?: boolean }): Element | nullivya.queryAllByRole(name: string, options?: ByRoleOptions): Element[]ivya.queryAllByTestId(name: string): Element[]ivya.queryAllByLabelText(matcher: string | RegExp, options?: { exact?: boolean }): Element[]ivya.queryAllByText(matcher: string | RegExp, options?: { exact?: boolean }): Element[]ivya.queryAllByTitle(matcher: string | RegExp, options?: { exact?: boolean }): Element[]ivya.queryAllByPlaceholder(matcher: string | RegExp, options?: { exact?: boolean }): Element[]ivya.queryAllByAltText(matcher: string | RegExp, options?: { exact?: boolean }): Element[]This project uses Vite+. Follow their guide to install vp cli. Try vp for interactive prompts.
# install dependencies and setup commit hooks
vp install
# ensure `vp run ...` to invoke package.json scripts
vp run dev
vp run build
vp run test
FAQs
Fork of Playwright's locator resolution
The npm package ivya receives a total of 4,654 weekly downloads. As such, ivya popularity was classified as popular.
We found that ivya demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.