question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] How to get browser instance from launchPersistent

See original GitHub issue

When handling extensions im having troubles with the new launch api.

from browser.launchPersistent how do i get a browser instance so i can

const targets = await this.browser.targets();
const backgroundPageTarget = targets.find(target => target.type() === 'background_page');

?

i can do it with browser.launch but then im in incognito mode which makes it harder/impossible to open the background_page devtool window programmatically.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
dgozmancommented, Mar 9, 2020

In the next release, persistent Chromium browser context will expose backgroundPages(). See this test for a code snippet.

Closing for now, please reopen if you find any issues.

0reactions
hugomrdiascommented, Feb 29, 2020

thank you for your help @dgozman FYI in tested the snippet with 0.11.1-next.1183 and targets doesn’t have a background_page.

looking forward for the new api changes 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use User created browser instance in Robot framework
I have created a python code to initialise a chrome browser and I want to pass this driver instance to Robot Framework so...
Read more >
WebDriverManager: How to manage browser drivers easily?
We can see the details of starting the chrome driver instance in the first line of output. Here we have set the Chrome...
Read more >
Work with Spot Instances - Amazon Elastic Compute Cloud
To use Spot Instances, you create a Spot Instance request that includes the desired number of instances, the instance type, and the Availability...
Read more >
ASP.NET Core Blazor state management - Microsoft Learn
Learn how to persist user data (state) in Blazor apps. ... The browser doesn't yet have a page in which it can run...
Read more >
Create and start a VM instance - Compute Engine
Note: Unless you explicitly choose a different boot disk, if the name of the new VM matches the name of an existing persistent...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found