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

[BUG]: Selenium tests not working on my page. Error: Cannot read properties of undefined #1356

Closed
kbpitula opened this issue Mar 21, 2023 · 4 comments
Assignees
Labels
Bug Something isn't working node-accessibility-checker Issues in the accessibility-checker component Ready for QA user-reported Issues identified outside of the core team

Comments

@kbpitula
Copy link

Project

a11y checker

Browser

Chrome

Operating system

Windows

Description

When i execute on my new page view i got that kind of error

Error message:

TypeError: Cannot read properties of undefined (reading 'length')
    at ACReportManager.setLevels (/Users/krzys/repos/com.ibm.itest.cloud.apsportal.featuregroup/node_modules/accessibility-checker/lib/ACReportManager.js:520:74)
    at /Users/krzys/repos/com.ibm.itest.cloud.apsportal.featuregroup/node_modules/accessibility-checker/lib/ACHelper.js:318:64
    at step (/Users/krzys/repos/com.ibm.itest.cloud.apsportal.featuregroup/node_modules/accessibility-checker/lib/ACHelper.js:33:23)
    at Object.next (/Users/krzys/repos/com.ibm.itest.cloud.apsportal.featuregroup/node_modules/accessibility-checker/lib/ACHelper.js:14:53)
    at fulfilled (/Users/krzys/repos/com.ibm.itest.cloud.apsportal.featuregroup/node_modules/accessibility-checker/lib/ACHelper.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
/Users/krzys/repos/com.ibm.itest.cloud.apsportal.featuregroup/node_modules/accessibility-checker/lib/ACReportManager.js:520
        for (var _i = 0, pageResults_1 = pageResults; _i < pageResults_1.length; _i++) {
"devDependencies": {
        "accessibility-checker": "3.1.26",
        "chromedriver": "110.0.0",
        "selenium-webdriver": "4.8.0"
    }

Steps to reproduce

Link to slack:
https://ibm-analytics.slack.com/archives/C036P1CTN/p1678701918841659

@aliunwala
Copy link
Contributor

Triage:
Here is another link to this thread
https://ibm-studios.slack.com/archives/C036P1CTN/p1678701918841659

@aliunwala aliunwala added Bug Something isn't working node-accessibility-checker Issues in the accessibility-checker component user-reported Issues identified outside of the core team labels Mar 27, 2023
@shunguoy
Copy link
Contributor

shunguoy commented Apr 24, 2023

Triage: reported by the IBM product team (Watson studio). @shunguoy will try to reproduce the issue.

@shunguoy
Copy link
Contributor

shunguoy commented May 5, 2023

@kbpitula tested with two settings: worked in the cloud, but failed in the cluster installation. The pages used in the two environments are identical except for the element CSS classes. The page runs fine in the cluster environment if some of those classes were removed.
It seems that the cause of the error is some js script failed to load. More error logs were added to the code, hopefully, the logs can provide more clues on the real cause.
The customer is suggested to use the new build for the test to see if more errors can be caught for further debugging. The issue will be closed for now.

tombrunet added a commit that referenced this issue May 19, 2023
…or logs (#1414)

* update package.json
* update web driver version and fix related errors #1356
* replace setDefaultService function in chrome #1356
* add more exception handling #1356
* more changes on the errors #1356
* clean up the code #1356
* add more error logs #1356
* update the boilerplates selenium-driver version from 4.3.0 to 4.8.0 #1356
* Use latest Selenium
---------

Co-authored-by: Tom Brunet <[email protected]>
@ErickRenteria
Copy link
Contributor

Merged

shunguoy added a commit that referenced this issue Jul 24, 2024
…or logs (#1414)

* update package.json
* update web driver version and fix related errors #1356
* replace setDefaultService function in chrome #1356
* add more exception handling #1356
* more changes on the errors #1356
* clean up the code #1356
* add more error logs #1356
* update the boilerplates selenium-driver version from 4.3.0 to 4.8.0 #1356
* Use latest Selenium
---------

Co-authored-by: Tom Brunet <[email protected]>
tombrunet added a commit that referenced this issue Aug 22, 2024
* Update for Puppeteer 19

* Update imports for ESM

* Fix object verification

* Fix ACT runs

* Throw out bounds differences within 2

* Update cypress package-lock

* Split cypress test

* Convert to absolute url for Windows

* Update gulpfile

* Split into cjs and mjs

* Use modules for testing

* Tests to mjs

* Fix extension

* More file extension changes

* Fix require check

* Fix file extension

* Update file extensions

* Fix testcase to work on Windows

* Update meta hack for ACT test

* chore(node,karma): Update selenium-webdriver (4.9.2) and add more error logs (#1414)

* update package.json
* update web driver version and fix related errors #1356
* replace setDefaultService function in chrome #1356
* add more exception handling #1356
* more changes on the errors #1356
* clean up the code #1356
* add more error logs #1356
* update the boilerplates selenium-driver version from 4.3.0 to 4.8.0 #1356
* Use latest Selenium
---------

Co-authored-by: Tom Brunet <[email protected]>

* chore(cypress): Update to latest Cypress (12.12.0)  (#1451)

* Update files to Cypress 12
* Use Node 18 for cypress
* Update boilerplate
* Put boilerplate dependency back
* Update baseline
* Run tests on Node 18
* Update test server packages
* Update lock file
* Try update ubuntu
* Split server and run commands
* Wrong command

* Selenium refix

* Wrong order

* Add jest boilerplate, fix terser typeof issue (#1461)

* Build failure

* import problems

* merge

* Issues with imports

* Import problems

* Fix module imports

* import problems

* Deal with cjs vs mjs for __dirname

* Fix filename

* Don't support 14.x with the 4.x branch

* Fix merge conflicts

* update the puppeteer version

* update the file

* update the package.json files

* update the comment

* update configuration files

* change from require to import

* change require() to import

* clean the code

* update the config files

* update the config

* update the confi

* upate files

* update baselines

* Create .npmrc

* Update .npmrc

* update conf file with node options

* update the wdio test files and config

* Update .npmrc

* update the node options

* update the code to use cjs

* Update package.json

* update the act conf

* Create .npmrc

* add node option in act test

* Update package.json

---------

Co-authored-by: Tom Brunet <[email protected]>
Co-authored-by: ErickR <[email protected]>
@shunguoy shunguoy mentioned this issue Dec 5, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working node-accessibility-checker Issues in the accessibility-checker component Ready for QA user-reported Issues identified outside of the core team
Projects
None yet
Development

No branches or pull requests

4 participants