Closed cjhuaxin closed 6 years ago
I found the solution, just add the launchBrowser: false option, this is code:
let pages = await chromy.getPageTargets();
let targetPage = pages.filter(p => p.url.indexOf(someKeys) > -1)[0];
chromy = await new Chromy({target: targetPage.targetId, activateOnStartUp: true, launchBrowser: false});
Thanks the examples
That's good! If you have another question open an issue anytime.
Hi, in my project, the chromy has multiple tabs, I'm tring to change the activate tab by targetId. this is my code:
but I got some errors like this:
TypeError: Cannot read property 'activateTarget' of undefined
Is there any way to activate the other tab? Thanks in advance!