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

ES6 async/awaits does not work with browser.elements() #2294

Closed
pawlakmaly opened this issue Jan 14, 2020 · 3 comments
Closed

ES6 async/awaits does not work with browser.elements() #2294

pawlakmaly opened this issue Jan 14, 2020 · 3 comments
Labels

Comments

@pawlakmaly
Copy link

Describe the bug

Async/awaits does not works with browser.elements function. It works ok with eg getText().

Sample test

sampleTest.js

// Please add the sample test here

module.exports = {
      'Dummy' : async function(browser){
        let dummy = await browser.elements('xpath', '//li[descendant::div[text()=\'User Management\']]//option')
        console.log("Result: " + dummy)
    }

  }
}

Run with command

$ nightwatch test/sampleTest.js --your-other-arguments-here

Verbose output

debug.log

Running:  Dummy

Result: undefined

Configuration

nightwatch.json

{
  "your": { "config": "here" }
}

Your Environment

Executable Version
nightwatch --version 1.3.2
npm --version 6.13.4
node --version v10.18.0
Browser driver Version
NAME VERSION

| OS | Version |
| Windows | 10 x64 |
| NAME | VERSION |

@pawlakmaly
Copy link
Author

Seems that in Promise resolved array with elements is not returned

@beatfactor beatfactor added the bug label Jan 15, 2020
@cyberSane
Copy link

I am also facing the same issue for both browser.element and browser.elements.

@readikus
Copy link

I am also experiencing this.

@beatfactor beatfactor changed the title ES6 async/awaits does not works with browser.elements function ES6 async/awaits does not work with browser.elements() Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants