chenglou / chenglou/node-huxley

Detect page change and reinject script correctly

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.