pa11y / pa11y-ci

Pa11y CI is a CI-centric accessibility test runner, built using Pa11y
https://pa11y.org
GNU Lesser General Public License v3.0
525 stars 63 forks source link

Error: page.on is not a function #85

Closed ghost closed 4 years ago

ghost commented 5 years ago

Im new to pa11y-ci and getting following error when i run pa11y-ci --config .pa11yci.json command. Node -v v8.15.0 Any idea on this ?

Running Pa11y on 2 URLs:
 > http://pa11y.org/ - Failed to run
 > http://pa11y.org/contributing - Failed to run

Errors in http://pa11y.org/:

 • Error: page.on is not a function

Errors in http://pa11y.org/contributing:

 • Error: page.on is not a function

✘ 0/2 URLs passed

.pa11yci.json file is same as the example given in github repo.

{ "defaults": { "timeout": 1000, "page": { "viewport": { "width": 320, "height": 480 } } }, "urls": [ "http://pa11y.org/", "http://pa11y.org/contributing" ] }

josebolos commented 5 years ago

Hi @manoj-pearson,

Thanks for creating the issue. It looks like the examples in the documentation may be wrong. If I'm not mistaken, the object should be called default and not defaults.

Would you mind changing that and let us know if that works for you, please?

Thanks!

ghost commented 5 years ago

@josebolos Thanks for quick response. Yah it worked. Is there an updated documentation ?

josebolos commented 5 years ago

I don't think so, no. If I'm not mistaken, all the documentation is in the README file.

I'll see if I can create a PR at some point in order to fix the examples.

ghost commented 5 years ago

@josebolos Thanks.

einSelbst commented 5 years ago

I did run into this issue so I opened #89 which is now merged. IMHO this can be closed now.

42tte commented 4 years ago

Pa11y Migrating from 4.0 to 5.0

The page option has been removed, as this was specific to PhantomJS. You can set the following options to achieve the same results:

  • page.viewport can now be set with a new viewport option

@manoj-pearson, correct settings would be:

{
    "defaults": {
        "timeout": 1000,
        "viewport": {
            "width": 320,
            "height": 480
        }
    },
    "urls": [
        "http://pa11y.org/",
        "http://pa11y.org/contributing"
    ]
}