codeceptjs / codeceptjs/CodeceptJS

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

Aperta
#4,749 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
stale
Lingua principale
JavaScript
Stelle
4.2k
Fork
757
Merge medio
2g 9h
PR unite (30g)
16

Descrizione

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:

```javascript
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!

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.