-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add browser window navigation +semver:feature #140
Conversation
mialeska
commented
May 6, 2024
- Update to Selenium 4.20.0
- Update to Selenium 4.20.0
WalkthroughEnhancements in browser window and tab management in the Aquality Selenium framework include improved navigation functions and localization. This update introduces new JavaScript utilities for window operations, updates dependency versions, and refines integration tests to align with the latest changes. Changes
Warning Review ran into problemsProblems (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (20)
- pom.xml (2 hunks)
- src/main/java/aquality/selenium/browser/Browser.java (1 hunks)
- src/main/java/aquality/selenium/browser/BrowserWindowNavigation.java (1 hunks)
- src/main/java/aquality/selenium/browser/IBrowserTabNavigation.java (1 hunks)
- src/main/java/aquality/selenium/browser/IBrowserWindowNavigation.java (1 hunks)
- src/main/java/aquality/selenium/browser/JavaScript.java (1 hunks)
- src/main/resources/js/openInNewWindow.js (1 hunks)
- src/main/resources/js/openNewWindow.js (1 hunks)
- src/main/resources/localization/be.json (1 hunks)
- src/main/resources/localization/en.json (1 hunks)
- src/main/resources/localization/pl.json (1 hunks)
- src/main/resources/localization/ru.json (1 hunks)
- src/main/resources/localization/uk.json (1 hunks)
- src/test/java/tests/integration/BrowserTabsTests.java (3 hunks)
- src/test/java/tests/integration/BrowserTests.java (1 hunks)
- src/test/java/tests/integration/BrowserWindowsTests.java (1 hunks)
- src/test/java/tests/usecases/devtools/DevToolsSessionTest.java (1 hunks)
- src/test/java/tests/usecases/devtools/DeviceEmulationTest.java (1 hunks)
- src/test/java/tests/usecases/devtools/NetworkSpeedEmulationTest.java (1 hunks)
- src/test/java/tests/usecases/devtools/OverrideUserAgentTest.java (1 hunks)
Files skipped from review due to trivial changes (7)
- pom.xml
- src/main/java/aquality/selenium/browser/JavaScript.java
- src/main/resources/js/openInNewWindow.js
- src/main/resources/js/openNewWindow.js
- src/test/java/tests/integration/BrowserTests.java
- src/test/java/tests/integration/BrowserWindowsTests.java
- src/test/java/tests/usecases/devtools/DeviceEmulationTest.java
Additional comments not posted (12)
src/test/java/tests/usecases/devtools/NetworkSpeedEmulationTest.java (1)
5-5
: Updated import statement aligns with the new Selenium version.src/main/java/aquality/selenium/browser/IBrowserWindowNavigation.java (1)
1-125
: InterfaceIBrowserWindowNavigation
correctly implements the new window navigation functionalities.src/main/java/aquality/selenium/browser/BrowserWindowNavigation.java (1)
1-130
: ClassBrowserWindowNavigation
correctly implements theIBrowserWindowNavigation
interface with detailed logging.src/test/java/tests/usecases/devtools/OverrideUserAgentTest.java (1)
11-11
: Updated import statement aligns with the new Selenium version.src/main/java/aquality/selenium/browser/IBrowserTabNavigation.java (1)
9-178
: InterfaceIBrowserTabNavigation
correctly deprecates old tab-specific methods and extendsIBrowserWindowNavigation
.src/main/resources/localization/en.json (1)
91-99
: New localization strings correctly describe the functionalities for browser window and tab operations.src/main/resources/localization/be.json (1)
91-99
: Ensure the new localization strings are consistent with the feature's functionality.The new strings for navigating in new windows and tabs, switching to specific windows or tabs, and opening or closing them are correctly added and reflect the intended functionality.
src/main/resources/localization/uk.json (1)
91-99
: Ensure the new localization strings are consistent with the feature's functionality.The new strings for navigating in new windows and tabs, switching to specific windows or tabs, and opening or closing them are correctly added and reflect the intended functionality.
src/main/resources/localization/ru.json (1)
91-99
: Ensure the new localization strings are consistent with the feature's functionality.The new strings for navigating in new windows and tabs, switching to specific windows or tabs, and opening or closing them are correctly added and reflect the intended functionality.
src/main/resources/localization/pl.json (1)
91-99
: Ensure the new localization strings are accurate and clear.The newly added localization strings for managing browser windows and navigating in new windows are clear and seem to accurately reflect the intended functionalities. Good job on maintaining consistency with existing localization patterns.
src/main/java/aquality/selenium/browser/Browser.java (2)
139-144
: Review the deprecation of thetabs()
method.The
tabs()
method has been deprecated and replaced with a new methodwindows()
. Ensure that all references to thetabs()
method in the codebase are updated to usewindows()
. This change aligns with the new focus on window navigation.
147-151
: Review the implementation of the newwindows()
method.The new
windows()
method is implemented correctly and provides an interface to manage browser windows. This is a crucial part of the new feature set introduced in this PR, and it has been integrated well with the existing architecture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Out of diff range and nitpick comments (1)
src/test/java/w3schools/forms/SelectMultipleForm.java (1)
49-49
: Ensure detailed logging for exceptions.While logging the exception in the
submit
method, consider adding more contextual information to help with debugging. For example, log the state of the form or other relevant details at the time of the exception.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/test/java/w3schools/forms/SelectMultipleForm.java (4 hunks)
Additional comments not posted (2)
src/test/java/w3schools/forms/SelectMultipleForm.java (2)
34-34
: Optimize waiting strategy for cookie acceptance.
[PERFORMANCE]
The methodacceptCookies
uses a fixed timeout for waiting for the cookie button to display. Consider using a more dynamic waiting strategy, such as polling the button state at intervals, to potentially reduce waiting time and improve test execution speed.
21-21
: Ensure consistent use of static imports.
[CONSISTENCY]
The static import ofgetConfiguration
is used in theacceptCookies
method. Ensure that this style is consistent across the project. If other parts of the project use direct method calls instead of static imports, consider aligning this usage to maintain consistency.
Quality Gate passedIssues Measures |