Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does this uses Locator from playwright, instead of using Locator from @playwright/test? #2

Open
gabrieldogaru opened this issue Jun 9, 2023 · 4 comments

Comments

@gabrieldogaru
Copy link

By using Locator from playwright instead of playwright/test, we cannot actually use the xPath call.

@alexferrari88
Copy link
Owner

can you please explain better?

@tomo970
Copy link

tomo970 commented Aug 30, 2023

He probably encountered the same issue as I today, after installing this package.
Do you maybe have a solution for this?
image

@alexferrari88
Copy link
Owner

can you please provide some code so that I can reproduce the bug?

@tomo970
Copy link

tomo970 commented Sep 2, 2023

import { xPath } from "playwright-dompath";
import { test } from '@playwright/test';

test('xpath test', async ({ page }) => {
const statusHeader = page.locator('//table')
const statusXpath = await xPath(statusHeader)
})

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants