Get the locator from the intersection of the locators #559
Answered
by
MatejBransky
MatejBransky
asked this question in
Ideas
-
Hi, I would like to build a custom locator based on existing ones. Something like this: const cellLocator = createCellLocator({
row: page.locator('data-rowindex="1"'),
column: page.locator('[role=columnheader]', { hasText: 'Description' })
})
function createCellLocator({ row, column }: { row: Locator, column: Locator }) {
// ...
} I can't find any solution which is close to this. Is there a way how to do it? The custom selector engine is relatively close to that but the issue is that I can't reuse existing selector engines or at least I don't know how. |
Beta Was this translation helpful? Give feedback.
Answered by
MatejBransky
Oct 11, 2022
Replies: 1 comment
Answer selected by
MatejBransky
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussion moved to the playwright repository.