Skip to content

Commit 89b482e

Browse files
updated the pw accessibility
1 parent eb6cbc0 commit 89b482e

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

docs/playwright-accessibility-test.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,19 @@ set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
118118
To enable the accessibility testing within your automated test suite, set the `accessibility: true` in your configuration file. You can also define other settings capabilities as described below.
119119

120120
```javascript
121-
const capabilities = {
122-
'LT:Options': {
123-
..//
124-
"accessibility":true,
125-
"accessibility.wcagVersion":"wcag21a",
126-
"accessibility.bestPractice":true,
127-
"accessibility.needsReview":true
128-
}
129-
}
121+
const capabilities = {
122+
"accessibility": true,
123+
"accessibility.wcagVersion": "wcag21a",
124+
"accessibility.bestPractice": false,
125+
"accessibility.needsReview": true
126+
};
130127
```
131128

132129
### Step 4: Add the following add-on Script
133-
In your `lambdatest-setup.js` file add these three lines after your page creation command as shown below:
130+
LambdaTest uses an internal Chrome extension that powers accessibility scans and generates accessibility reports. In your `lambdatest-setup.js` file add these three lines after your page creation command as shown below:
134131

135132
```javascript
133+
// Load the extension for report generation of the accessibility tests
136134
await ltPage.goto("chrome://extensions/?id=johgkfjmgfeapgnbkmfkfkaholjbcnah");
137135
const secondToggleButton = ltPage.locator('#crToggle').nth(0);
138136
await secondToggleButton.click();
@@ -143,7 +141,7 @@ await secondToggleButton.click();
143141
Now execute your tests and visit the [Automation Dashboard](https://accounts.lambdatest.com/dashboard). Click on the Accessibility tab and check the report generated.
144142

145143
```bash
146-
node test
144+
npx playwright test --config=./playwright.config.js
147145
```
148146

149147
<img loading="lazy" src={require('../assets/images/accessibility-testing/playwright/playwright-accessibility.png').default} alt="automation-dashboard" className="doc_img"/>

0 commit comments

Comments
 (0)