codeceptjs / codeceptjs/CodeceptJS

Puppeteer / waitForText method: doesn't works with xpath selector

Offen
#1,863 1 Kommentar 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
4.2k
Forks
757
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
16

Beschreibung

> Provide console output if related. Use `--verbose` mode for more details.

```bash
Text "Get started with GitHub Enterprise" was not found on page after 3 sec
Evaluation failed: TypeError: $XPath is not a function
at eval (eval at waitForPredicatePageFunction (:2:21), :4:22)
at eval (eval at waitForPredicatePageFunction (:2:21), :7:11)
at onRaf (__puppeteer_evaluation_script__:56:33)
at pollRaf (__puppeteer_evaluation_script__:48:5)
at waitForPredicatePageFunction (__puppeteer_evaluation_script__:7:18)
```

> Provide test source code if related

```js
Feature('User Story');

Scenario('QA', (I) => {
I.amOnPage('https://github.com');
I.waitForText('Get started with GitHub Enterprise', 3, '//*[@class="h1-mktg"]');

});
```

### Details

* CodeceptJS version: 2.3.0
* NodeJS Version: v11.0.0
* Operating System: Linux Mint
* Puppeteer: 1.19.0
![DeepinScrot-2354](https://user-images.githubusercontent.com/19324105/63789558-4bc69800-c900-11e9-8214-f563b2f5aef4.png)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.