microsoft/playwright-java

How to get chrom extension background page

Closed this issue · 11 comments

Please do not submit this issue.

  • I understand

Hi, as the doc shown. https://playwright.dev/java/docs/api/class-page

Page provides methods to interact with a single tab in a Browser, or an extension background page in Chromium. One Browser instance might have multiple Page instances.

But how can I switch to background_pages?
For now ,I have already loaded extension and this extension already display in the page, but I don't known how to switch to the extension.

from the https://playwright.dev/docs/chrome-extensions, I have use the same launchPersistentContext to launch the chromium with java version, but lack of browserContext.backgroundPages()

Looks like the method is not exposed in Java API, we can fix that.

Looks like the method is not exposed in Java API, we can fix that.

thanks

Hi, yury-s How can I use the latest code for our project? could you give me some suggestion?

This will be published in the next release. Before that you can build the project from source.

@yury-s Do we have a timeline for the next release , I mean by when we can expect this change to be available for use ?

It didn't make it to 1.43, so the earliest release it will be available in is 1.44. We are going to push 1.43 in the next few days, so 1.44 will be in about a month.

It didn't make it to 1.43, so the earliest release it will be available in is 1.44. We are going to push 1.43 in the next few days, so 1.44 will be in about a month.

Hi,yury-s, how can I package this from source code? I wan to publish to our nexus with the latest code? But mvn install failed and seems need some configuration for package...

Hi, yury-s,we need this function for our automation project. could you give some instruction how to build the snapshot version?

Take a look at our yaml file:

- uses: actions/checkout@v2
- uses: microsoft/playwright-github-action@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 8
- name: Download drivers
shell: bash
run: scripts/download_driver_for_all_platforms.sh
- name: Build & Install
run: mvn -B install -D skipTests --no-transfer-progress

There are also instructions in our contributing guide.