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

Playwright: WebKit: TypeError: $XPath is not a function. (In '$XPath(null, locator)', '$XPath' is "function $XPath(element, selector) #4749

Open
olgabenchuk24 opened this issue Jan 17, 2025 · 0 comments

Comments

@olgabenchuk24
Copy link

olgabenchuk24 commented Jan 17, 2025

Hello everyone,

I'm currently using codecept js Playwright(1.49.1) for testing and have the following code to click a button with a specific text:

I.waitForEnabled(locate('.RadioButton-caption').withText(`${option}`));
I.click(locate('.RadioButton-caption').withText(`${option}`));

I am running the test in WebKit, but I’m encountering the following error:

     element ({xpath: .//*[contains(concat(' ', normalize-space(./@class), ' '), ' RadioButton-caption ')][contains(., 'olyattest')]}) still not enabled after 10 sec
page.waitForFunction: TypeError: $XPath is not a function. (In '$XPath(null, locator)', '$XPath' is "function $XPath(element, selector) {
  const found = document.evaluate(selector, element || document.body, null, 5, null);
  const res = [];
  let current = null;
  while (current = found.iterateNext()) {
    res.push(current);
  }
  return res;
}")

It looks like I.waitForEnabled does not support xpath when running in webkit using playwright. Could you please fix it?

Thank you!

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

1 participant