File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,18 +97,29 @@ The test script assumes a recent version of Node.js to be available.
9797``` javascript
9898const puppeteer = require (' puppeteer-core' );
9999
100+ // Replace with the path to the chrome executable in your file system. This one assumes MacOSX.
101+ const executablePath = ' /Applications/Google Chrome.app/Contents/MacOS/Google Chrome' ;
102+
103+ // Replace with the url you wish to test.
104+ const url = ' https://www.squiz.net' ;
105+
100106(async () => {
101107 const browser = await puppeteer .launch ({
102- executablePath: ' Google Chrome binary location '
108+ executablePath
103109 });
110+
104111 const page = await browser .newPage ();
105- page .on (' console' , msg => console .log (msg .text ()));
106112
107- await page .goto (' web site URL' );
113+ page .on (' console' , msg => {
114+ console .log (msg .text ())
115+ });
116+
117+ await page .goto (url);
108118
109119 await page .addScriptTag ({
110120 path: ' build/HTMLCS.js'
111121 });
122+
112123 await page .evaluate (function () {
113124 HTMLCS_RUNNER .run (' WCAG2AA' );
114125 });
You can’t perform that action at this time.
0 commit comments