Feature/web smart sync all locator#3796
Conversation
Also refactored the code for serializer wherever applicable
This reverts commit 3ed2ffb.
…ngToZeroOnReload Bug fix/dev time resetting to zero on reload
[Defect Id: 40342]removed margin and added borders for DB action
…rPlaywrightSupportExistingPOM Feature - 39520 - Tests For Playwright Support Existing POM
Fixed serializer so Empty Guid and Zero timespan won't get serialized
WalkthroughThis update introduces enhancements to the Changes
Poem
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.
Actionable comments posted: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- Ginger/Ginger/Actions/ActionEditPages/ActWebSmartSyncEditPage.xaml (1 hunks)
- Ginger/Ginger/Actions/ActionEditPages/ActWebSmartSyncEditPage.xaml.cs (5 hunks)
- Ginger/GingerCoreNET/ActionsLib/UI/ActWebSmartSync.cs (1 hunks)
- Ginger/GingerCoreNET/Application Models/Execution/POM/POMExecutionUtils.cs (2 hunks)
- Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (3 hunks)
- Ginger/GingerCoreNETUnitTest/Drivers/CoreDrivers/Web/Selenium/SeleniumUnitTest.cs (1 hunks)
Additional comments not posted (7)
Ginger/Ginger/Actions/ActionEditPages/ActWebSmartSyncEditPage.xaml (1)
25-28: New UI Elements Added: StackPanel and CheckBoxThe addition of
xPomPanelStackPanel andxAlllocatorCheckboxCheckBox align with the UI enhancements described in the summary. Ensure that the naming convention and visibility settings are consistent with existing UI elements.Ginger/Ginger/Actions/ActionEditPages/ActWebSmartSyncEditPage.xaml.cs (1)
38-38: Code Enhancements in ActWebSmartSyncEditPage.xaml.cs
- Import Statement Added: The import of
Amdocs.Ginger.Common.Actionsis appropriate for the new functionality.- New Binding Added: The binding of
UseAllLocatorstoxAlllocatorCheckboxis correctly implemented.- New Methods: The
setAlllocatorCheckboxVisbilitymethod is implemented correctly and is called at appropriate control flow points to manage the visibility ofxAlllocatorCheckboxbased on the selected element.Ensure that the method is robust against potential null values in control properties.
Also applies to: 63-63, 73-73, 175-185, 203-203
Ginger/GingerCoreNETUnitTest/Drivers/CoreDrivers/Web/Selenium/SeleniumUnitTest.cs (1)
21-255: Unit Tests Added in SeleniumUnitTest.csThe new unit tests added for the
GetLocatorsForWebSmartSyncmethod cover various scenarios including:
- Using primitive locators.
- Using the first active locator.
- Using the first supported locator.
- Handling no active locator.
- Handling no supported locator.
- Handling no current POM.
- Handling no current POM element info.
- Handling unsupported
LocateByvalues.These tests are well-structured and seem to thoroughly check the functionality of the method under different conditions.
Ginger/GingerCoreNET/ActionsLib/UI/ActWebSmartSync.cs (1)
285-298: New Property Added: UseAllLocatorsThe addition of the
UseAllLocatorsproperty inActWebSmartSyncclass is implemented correctly. The property is designed to handle both get and set operations with appropriate data type conversions and default values.Ensure that the property is used consistently across the application where relevant.
Ginger/GingerCoreNET/Application Models/Execution/POM/POMExecutionUtils.cs (1)
58-58: Methods Made Virtual in POMExecutionUtils.csThe methods
GetCurrentPOMandGetCurrentPOMElementInfohave been made virtual, allowing them to be overridden in derived classes. This change enhances the flexibility and extensibility of the POM execution utility class.Ensure that derived classes override these methods appropriately to maintain consistent behavior across different use cases.
Also applies to: 72-72
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (2)
2441-2446: Proper handling of timeout values inWebSmartSyncGetMaxTimeout.This method correctly checks for valid timeout values which is crucial for avoiding indefinite waits.
107-112: Static listoperationsWithoutLocatorinitialization looks good.Please ensure that these enum values are used correctly in conditions where operations do not require locators.
Verification successful
Static list
operationsWithoutLocatorinitialization looks good.The usage of
operationsWithoutLocatorin theWebSmartSyncHandlermethod appears correct. The condition checks if theact.SyncOperationsis not in theoperationsWithoutLocatorlist before proceeding with locator-related operations.
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs: Line 107Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs: Line 131Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct usage of enum values in conditions. # Test: Search for the enum usage. Expect: Correct conditional checks. rg --type python $'operationsWithoutLocator'Length of output: 74
Script:
#!/bin/bash # Description: Verify the correct usage of enum values in conditions. # Test: Search for the enum usage. Expect: Correct conditional checks. rg --type cs 'operationsWithoutLocator'Length of output: 338
Script:
#!/bin/bash # Description: Extract and review the usage context of `operationsWithoutLocator`. # Extract 10 lines before and after the usage of `operationsWithoutLocator`. rg --type cs 'operationsWithoutLocator' -A 10 -B 10Length of output: 5363
This reverts commit 3ed2ffb.
…l values for list element
2- fixing category related bugs 3- added check for mobile driver to validate the session is still active before taking screen shoot
…close the last opened tab manually. If we run any failing action, it is not able to take the screenshot. RC: When we close the tab manually, our code doesn't get notified and it still tries to take screenshot from the already closed tab. Fix: Add Close event listener to Playwright Page and handle manual tab close.
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- Ginger/Ginger/MainWindow.xaml (5 hunks)
- Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
Additional comments not posted (10)
Ginger/Ginger/MainWindow.xaml (10)
96-96: Verify the consistency of margin values.The margin values have been adjusted to
5,0,-5,0. Ensure that these values are consistent with the design guidelines and other similar elements.
103-103: Verify the consistency of margin values.The margin values have been adjusted to
5,0,-5,0. Ensure that these values are consistent with the design guidelines and other similar elements.
108-108: Verify the consistency of margin values.The margin values have been adjusted to
5,0,-5,0. Ensure that these values are consistent with the design guidelines and other similar elements.
113-113: Verify the consistency of margin values.The margin values have been adjusted to
5,0,-5,0. Ensure that these values are consistent with the design guidelines and other similar elements.
118-118: Verify the consistency of margin values.The margin values have been adjusted to
5,0,-5,0. Ensure that these values are consistent with the design guidelines and other similar elements.
128-128: Verify the consistency of margin values.The margin values have been adjusted to
5,0,-5,0. Ensure that these values are consistent with the design guidelines and other similar elements.
133-133: Verify the consistency of margin values.The margin values have been adjusted to
5,0,-5,0. Ensure that these values are consistent with the design guidelines and other similar elements.
149-149: Verify the consistency of margin values.The margin values have been adjusted to
5,0,-5,0. Ensure that these values are consistent with the design guidelines and other similar elements.
154-154: Verify the consistency of margin values.The margin values have been adjusted to
5,0,-5,0. Ensure that these values are consistent with the design guidelines and other similar elements.
159-159: Verify the consistency of margin values.The margin values have been adjusted to
5,0,-5,0. Ensure that these values are consistent with the design guidelines and other similar elements.
Thank you for your contribution.
Before submitting this PR, please make sure:
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Refactor
Style