Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get chrom extension background page #1530

Closed
1 task done
hzk007 opened this issue Apr 1, 2024 · 11 comments · Fixed by microsoft/playwright#30210
Closed
1 task done

How to get chrom extension background page #1530

hzk007 opened this issue Apr 1, 2024 · 11 comments · Fixed by microsoft/playwright#30210
Labels

Comments

@hzk007
Copy link

hzk007 commented Apr 1, 2024

Please do not submit this issue.

  • I understand
@hzk007
Copy link
Author

hzk007 commented Apr 1, 2024

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.

@hzk007
Copy link
Author

hzk007 commented Apr 1, 2024

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()

@yury-s
Copy link
Member

yury-s commented Apr 1, 2024

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

@hzk007
Copy link
Author

hzk007 commented Apr 2, 2024

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

thanks

@hzk007
Copy link
Author

hzk007 commented Apr 3, 2024

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

@yury-s
Copy link
Member

yury-s commented Apr 3, 2024

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

@sushantmishra
Copy link

@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 ?

@yury-s
Copy link
Member

yury-s commented Apr 4, 2024

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.

@hzk007
Copy link
Author

hzk007 commented Apr 8, 2024

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...

@hzk007
Copy link
Author

hzk007 commented Apr 11, 2024

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

@yury-s
Copy link
Member

yury-s commented Apr 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants