- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.5k
[java] Add code examples to show how to use user context for single browser instance #2228
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
[java] Add code examples to show how to use user context for single browser instance #2228
Conversation
| 👷 Deploy request for selenium-dev pending review.Visit the deploys page to approve it 
 | 
| PR Reviewer Guide 🔍Here are some key observations to aid the review process: 
 | 
| PR Code Suggestions ✨Explore these optional code suggestions: 
 | |||||||||
User description
Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.
Description
Motivation and Context
Types of changes
Checklist
PR Type
Tests
Description
Added multiple test classes for parallel browser instance testing.
MultipleInstanceParallelTesttests background color changes using multiple browser instances.SingleInstanceCookieParallelTesttests background color changes using a single browser instance with user context.SingleInstanceCookieParallelGridTesttests similar functionality on a Selenium Grid setup.Demonstrated the use of WebDriver BiDi API for user context and browsing context management.
Included assertions for verifying background color changes and default states.
Changes walkthrough 📝
MultipleInstanceParallelTest.java
Add tests for multiple browser instance parallel testingexamples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/user_context/MultipleInstanceParallelTest.java
instances.
SingleInstanceCookieParallelTest.java
Add tests for single browser instance with user contextexamples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/user_context/SingleInstanceCookieParallelTest.java
instance.
SingleInstanceCookieParallelGridTest.java
Add Selenium Grid tests for single browser instanceexamples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/user_context/SingleInstanceCookieParallelGridTest.java
WebDriver.
@Ignoreannotations for tests, likely for future enablement.