You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm facing an issue and don't know if it can be resolved with simple-headless-chrome.
Here is a simple example :
A final user has several scripts to be loaded in a page. I must react when a given script is loaded (let's say scriptB).
<!DOCTYPE html><html><head><title>Unit tests for Rate Plan Component</title><metahttp-equiv='X-UA-Compatible' content='IE=edge'><metacharset="utf-8"><scriptsrc="scriptA.js"/><scriptsrc="scriptB.js"/><!-- SEND an evaluateAsync() when script B is loaded ! --><scriptsrc="scriptC.js"/></head><body>
...
</body></html>
For now, all I've found using this project is :
wait for goTo() promise to be resolved, but then it is too late for me, as execution of scriptC is already done.
From DEBUG logs, I can see : HeadlessChrome:events:Network -- Network.loadingFinished
So I guess that knowledge of scripts loaded are possible, but maybe not available.
Context:
I must use a dedicated QUnit runner for tests and, thus, have some callbacks definitions to inject in order to be notified.
I cannot ask users to put a dedicated script for that in the scripts requests. (let's say a script B', to be ran just between script B and C), as the solution must also work without this runner, so no custom dev possible in client final solution.
So, is there any (easy) way to be notified when a script is effictivly loaded using simple-headless-chrome ?
PS: BTW, really nice and helpful library ;-)
The text was updated successfully, but these errors were encountered:
Hi,
I'm facing an issue and don't know if it can be resolved with simple-headless-chrome.
Here is a simple example :
A final user has several scripts to be loaded in a page. I must react when a given script is loaded (let's say scriptB).
For now, all I've found using this project is :
goTo()
promise to be resolved, but then it is too late for me, as execution of scriptC is already done.From DEBUG logs, I can see :
HeadlessChrome:events:Network -- Network.loadingFinished
So I guess that knowledge of scripts loaded are possible, but maybe not available.
Context:
So, is there any (easy) way to be notified when a script is effictivly loaded using simple-headless-chrome ?
PS: BTW, really nice and helpful library ;-)
The text was updated successfully, but these errors were encountered: