Why doesn't it work on my website? Error about `element.click` not being a function
I have an SPA at https://play.basketball-gm.com/ and I tried running fuite on it with `npx run fuite https://play.basketball-gm.com/
` and it seems to not work with any of my links, it just shows stuff like this:
```
$ npx fuite https://play.basketball-gm.com/
Need to install the following packages:
fuite@5.0.0
Ok to proceed? (y)
URL : https://play.basketball-gm.com/
Scenario : Default
Iterations: 7 (Default)
TEST RESULTS
--------------------
Test : Go to /new_league and back
Failed : Element a[href="/new_league"] is not clickable or is not an in-page SPA navigation
element.click is not a function
TypeError: Element a[href="/new_league"] is not clickable or is not an in-page SPA navigation
element.click is not a function
at clickFirstVisible (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/defaultScenario.js:37:13)
at async iteration (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/defaultScenario.js:90:3)
at async file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:148:7
at async runOnFreshPage (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:39:14)
at async runIterationOnPage (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:147:13)
at async file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:212:17
at async runWithSpinner (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:81:13)
at async runIteration (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:207:15)
TypeError: element.click is not a function
at clickFirstVisible (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/defaultScenario.js:35:21)
at async iteration (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/defaultScenario.js:90:3)
at async file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:148:7
at async runOnFreshPage (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:39:14)
at async runIterationOnPage (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:147:13)
at async file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:212:17
at async runWithSpinner (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:81:13)
at async runIteration (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:207:15)
at async findLeaks (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/index.js:236:23)
at async main (file:///home/jdscheff/.npm/_npx/4f0bae50eb4a6363/node_modules/fuite/src/cli.js:88:20)
```
...and similar errors for other pages it tries.
Maybe something about my router, which is custom rather than one of the common libraries. But the link in that error message is definitely clickable, and if I use the browser dev tools console to `.click()` it, it does load a new page at that new URL, like a normal SPA.
关闭于 2024-08-23 3 条评论