Navigation Menu

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

Cannot use axeRun in async/await format #3531

Closed
Puneet0609 opened this issue Dec 23, 2022 · 3 comments · Fixed by reallymello/nightwatch-axe-verbose#11
Closed

Cannot use axeRun in async/await format #3531

Puneet0609 opened this issue Dec 23, 2022 · 3 comments · Fixed by reallymello/nightwatch-axe-verbose#11
Labels

Comments

@Puneet0609
Copy link

Description of the bug/issue

axeRun() function for accessibility not givinig response outside the scope. It shows undefined

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

Sample test

async runAccessibilityTests(pageName, type = 'page', include = 'nil') {
    let rules = "runOnly: ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']";
    if (!include){
      rules += `, include: [['${include}']]`;
    }
    const result = await browser.axeInject().axeRun('html',{
        rules : `${rules}`
     }
    );
    console.log(result);

Command to run

No response

Verbose Output

No response

Nightwatch Configuration

No response

Nightwatch.js Version

2.5.4

Node Version

No response

Browser

No response

Operating System

No response

Additional Information

No response

@gravityvi gravityvi changed the title axeRun() function for accessibility not givinig response Cannot use axeRun in async/await format Dec 26, 2022
@gravityvi gravityvi added the bug label Dec 26, 2022
@reallymello
Copy link
Contributor

@gravityvi 's fix is in nightwatch-axe-verbose@2.1.0. Thank you.

@beatfactor
Copy link
Member

Fixed in v2.6.6

@simonwang384
Copy link

Thanks @reallymello! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants