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

Google example test fails out of the box #62

Open
aberonni opened this issue Oct 8, 2022 · 0 comments
Open

Google example test fails out of the box #62

aberonni opened this issue Oct 8, 2022 · 0 comments

Comments

@aberonni
Copy link

aberonni commented Oct 8, 2022

On a new repository, after running npm init nightwatch with defaults, and then running npx nightwatch ./nightwatch/examples, the google example test fails.


┌ ────────────────── ✖  examples/with-page-objects/google.js  ───────────────────────────────────────┐
│                                                                                                    │
│                                                                                                    │
│   [google search with consent form - page objects] Test Suite                                      │
│   ───────────────────────────────────────────────────────────────────────────────                  │
│   - Starting ChromeDriver on auto-generated port...                                                │
│   ℹ Connected to ChromeDriver on port undefined (2497ms).                                          │
│   Using: chrome (106.0.5249.61) on MAC OS X.                                                       │
│   - Loading url: https://google.no                                                                 │
│   ℹ Loaded url https://google.no in 2120ms                                                         │
│   Results for: should find nightwatch.js in results                                                │
│   → Error                                                                                          │
│                                                                                                    │
│   Error while running .setElementValue() protocol action: element not interactable                 │
│   (Session info: chrome=106.0.5249.61)                                                             │
│                                                                                                    │
│   → TimeoutError                                                                                   │
│                                                                                                    │
│   An error occurred while running .setValue() command on <Element [name=@searchBar]>: element      │
│   not interactable                                                                                 │
│   (Session info: chrome=106.0.5249.61)                                                             │
│   {"error":{"name":"ElementNotInteractableError","remoteStacktrace":""},"status":-1,"value":null   │
│   }                                                                                                │
│                                                                                                    │
│   Error location:                                                                                  │
│   /Users/dom/git/DELETEME/nightwatch/examples/with-page-objects/google.js:                         │
│   –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––                        │
│   17 |                                                                                             │
│   18 |   it('should find nightwatch.js in results', function(browser) {                            │
│   19 |     homePage.setValue('@searchBar', 'Nightwatch.js');                                       │
│   20 |     homePage.submit();                                                                      │
│   21 |                                                                                             │
│   –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––                        │
│                                                                                                    │
│   → NightwatchAssertError                                                                          │
│                                                                                                    │
│   Timed out while waiting for element <input[value="Google Search"]> to be visible for 1000        │
│   milliseconds. - expected "visible" but got: "not visible" (1048ms)                               │
│                                                                                                    │
│   Error location:                                                                                  │
│   /Users/dom/git/DELETEME/nightwatch/page-objects/google/search.js:                                │
│   ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––                               │
│   15 | const searchCommands = {                                                                    │
│   16 |   submit() {                                                                                │
│   17 |     this.waitForElementVisible('@submitButton', 1000)                                       │
│   18 |       .click('@submitButton');                                                              │
│   19 |                                                                                             │
│   ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––                               │
│                                                                                                    │
│   ✖ examples/with-page-objects/google.js [google search with consent form - page objects] should   │
│   find nightwatch.js in results (6.489s)                                                           │
│   Timed out while waiting for element <input[value="Google Search"]> to be visible for 1000        │
│   milliseconds. - expected "visible" but got: "not visible" (1048ms)                               │
│   at Page.submit (/Users/dom/git/DELETEME/nightwatch/page-objects/google/search.js:17:10)          │
│   at DescribeInstance.<anonymous>                                                                  │
│   (/Users/dom/git/DELETEME/nightwatch/examples/with-page-objects/google.js:20:14)                  │
│                                                                                                    │└────────────────────────────────────────────────────────────────────────────────────────────────────┘

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