hero icon indicating copy to clipboard operation
hero copied to clipboard

execute-js-plugin not work.

Open nivzee opened this issue 1 year ago • 1 comments

i found a demo for using execute-js-plugin on npmjs

import HeroCore from '@ulixee/hero-core';
import Hero from '@ulixee/hero';
import ExecuteJsPlugin from '@ulixee/execute-js-plugin';

HeroCore.use(ExecuteJsPlugin);

(async function run() {
    const hero = new Hero();
    hero.use(ExecuteJsPlugin);
    await hero.goto('https://news.ycombinator.com');
    const title = await hero.executeJs(() => {
         return window.document.title;
    });
    console.log('title')
})();

after install all packages, i tried it but nothing result. No warning, no throwing, no printing.

nivzee avatar Jan 01 '25 10:01 nivzee

What about a "try catch" block? Also is your hero instance running?

vikito755 avatar Oct 14 '25 00:10 vikito755