chenglou / chenglou/node-huxley
Detect page change and reinject script correctly
- Dominant language
- JavaScript
- Stars
- 358
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Formal ideas to solve #7.
For keeping the events, the easiest solution would be to store the events in local storage.
For reinjecting the script… This can get messy. Would be extremely nice if Selenium driver had a page refresh event or something, but don't think so. In this case we could ask the user to reinject the events detection script manually, but that's a bit much overhead for my taste.
Also need to consider the time taken to switch pages. Assuming there are stuff to load, this is non-deterministic. In most cases putting a live screenshot point before and after clicking works, but it's not 100% reliable. _Edit:_ there seems to be a `WebDriverWait` for Selenium; this could be extremely handy providing that there's the node counterpart. Really wish they could start documenting their code because plowing through it wasn't fun.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading issue #7 and reviewing how the project currently detects events and switches pages. Investigate local storage for preserving events, the Node counterpart to Selenium's WebDriverWait, and how page changes trigger reinjection. Done means event detection survives page changes and waits reliably for content before reinjecting the script.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100