-
Notifications
You must be signed in to change notification settings - Fork 58
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
Pending Patch/claro 23.5 fix #3665
base: master
Are you sure you want to change the base?
Conversation
- limiting ucList item name and description width + adding horizontal scroll bar - minimixing the sapce between ucLict items - fixing Appium Swipe up/down/left/right
…Meni Adding ucList + Appium swipe fixes to Ginger official release
…023.5' into 2023.5/HotFix/DoubleClickIssue
…lickIssue Double click Issue Fix
…entralizedHTMlURL
Bug fix/htmlurl
WalkthroughThe recent updates across the Ginger software focus on refining event handling, enhancing UI components, and simplifying code for better maintainability. Changes include shifting from Changes
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
Out of diff range and nitpick comments (1)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Mobile/Appium/GenericAppiumDriver.cs (1)
Line range hint
1412-1441
: Adjust swipe logic to ensure compatibility with Appium 2.0.- startX = sz.Width * 0.8 * impact; - endX = sz.Width * 0.1; - startX = sz.Width * 0.1; - endX = sz.Width * 0.8 * impact; + startX = sz.Width * 0.7 * impact; + endX = sz.Width * 0.3; + startX = sz.Width * 0.3; + endX = sz.Width * 0.7 * impact;Ensure that the new swipe logic is tested across different devices to confirm that the swipe actions perform as expected.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (14)
- Ginger/Ginger/AutomatePageLib/AddActionMenu/ActionsLibrary/ActionsLibraryNavPage.xaml.cs (1 hunks)
- Ginger/Ginger/AutomatePageLib/AddActionMenu/SharedRepositoryLib/ActionsRepositoryPage.xaml.cs (1 hunks)
- Ginger/Ginger/AutomatePageLib/AddActionMenu/SharedRepositoryLib/ActivitiesGroupsRepositoryPage.xaml.cs (1 hunks)
- Ginger/Ginger/AutomatePageLib/AddActionMenu/SharedRepositoryLib/ActivitiesRepositoryPage.xaml.cs (1 hunks)
- Ginger/Ginger/Dictionaries/Skins/GingerDefaultSkinDictionary.xaml (1 hunks)
- Ginger/Ginger/UserControlsLib/UCListView/UcListView.xaml (1 hunks)
- Ginger/Ginger/UserControlsLib/UCListView/UcListViewItem.xaml (2 hunks)
- Ginger/GingerCore/Actions/UIAutomation/UIAComWrapperHelper.cs (1 hunks)
- Ginger/GingerCoreCommon/GingerCoreCommon.csproj (1 hunks)
- Ginger/GingerCoreCommon/ReportsLib/HTMLReportsConfiguration.cs (3 hunks)
- Ginger/GingerCoreNET/Drivers/CoreDrivers/Mobile/Appium/GenericAppiumDriver.cs (3 hunks)
- Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (1 hunks)
- Ginger/GingerCoreNET/WorkSpaceLib/SolutionOperations.cs (1 hunks)
- Ginger/GingerCoreNET/WorkSpaceLib/WorkSpace.cs (1 hunks)
Files skipped from review due to trivial changes (5)
- Ginger/Ginger/Dictionaries/Skins/GingerDefaultSkinDictionary.xaml
- Ginger/Ginger/UserControlsLib/UCListView/UcListView.xaml
- Ginger/GingerCore/Actions/UIAutomation/UIAComWrapperHelper.cs
- Ginger/GingerCoreCommon/GingerCoreCommon.csproj
- Ginger/GingerCoreNET/WorkSpaceLib/WorkSpace.cs
Additional comments not posted (9)
Ginger/GingerCoreCommon/ReportsLib/HTMLReportsConfiguration.cs (2)
34-39
: The addition of theCentralizedHTMLURL
property is well-documented with comments explaining its purpose for backward compatibility. This is a good practice as it helps maintain clarity in the codebase.
157-159
: The update in theSerializationError
method to handle theCentralizedHtmlReportServiceURL
by assigning its value to the newCentralizedHTMLURL
property ensures backward compatibility. This change is crucial for maintaining the functionality with older configurations.Ginger/Ginger/AutomatePageLib/AddActionMenu/SharedRepositoryLib/ActionsRepositoryPage.xaml.cs (1)
121-121
: The addition of thegrdActions_grdMain_ItemMouseDoubleClick
event handler toxActionListView.ItemMouseDoubleClick
is appropriate for enhancing UI interactivity by allowing users to trigger actions through double-clicks.Ginger/Ginger/AutomatePageLib/AddActionMenu/SharedRepositoryLib/ActivitiesGroupsRepositoryPage.xaml.cs (1)
86-86
: The addition of multiple event handlers (grdActivitiesGroupsRepository_grdMain_ItemMouseDoubleClick
,grdActivitiesGroupsRepository_ItemDropped
,grdActivitiesGroupsRepository_PreviewDragItem
) toxActivitiesGroupsRepositoryListView
enhances the page's interactivity and functionality, allowing for more dynamic user interactions.Ginger/Ginger/AutomatePageLib/AddActionMenu/SharedRepositoryLib/ActivitiesRepositoryPage.xaml.cs (1)
145-145
: The addition of multiple event handlers (grdActivitiesRepository_grdMain_ItemMouseDoubleClick
,grdActivitiesRepository_ItemDropped
,grdActivitiesRepository_PreviewDragItem
) toxActivitiesRepositoryListView
enhances the page's interactivity and functionality, allowing for more dynamic user interactions.Ginger/Ginger/UserControlsLib/UCListView/UcListViewItem.xaml (1)
Line range hint
102-135
: The adjustments made to the text alignment and width settings for thexItemNameTxtBlock
andxItemDescriptionTxtBlock
improve the readability and visual appeal of list items. These changes are likely to enhance the user experience by providing a cleaner and more organized display.Ginger/GingerCoreNET/WorkSpaceLib/SolutionOperations.cs (1)
314-320
: The update to set theCentralizedHtmlReportServiceURL
inexecutionLoggerConfiguration
based on the presence of a selected HTML report configuration ensures that the system remains backward compatible and functional with existing configurations.Ginger/Ginger/AutomatePageLib/AddActionMenu/ActionsLibrary/ActionsLibraryNavPage.xaml.cs (1)
206-206
: The addition of theActionsListViewItem_MouseDoubleClick
event handler toucListView.ItemMouseDoubleClick
is appropriate for enhancing UI interactivity by allowing users to trigger actions through double-clicks.Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (1)
685-685
: EnsureGetDriversPathPerOS()
correctly handles all supported OS environments.Verification successful
The implementation of
GetDriversPathPerOS()
in theSeleniumDriver.cs
file has been verified to handle different operating systems correctly. The method includes specific checks for Windows, macOS (OSX), and Linux, returning appropriate paths based on the operating system and browser type. This ensures that the driver paths are set correctly for the supported environments.
- Windows: Handles both 64-bit browsers specifically for Internet Explorer and Firefox, and provides a general case for other situations.
- macOS (OSX) and Linux: Returns the general driver path without specific conditions for browser types.
This implementation aligns with the requirements for a method that needs to adapt to different OS environments in a Selenium-based automation framework.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of `GetDriversPathPerOS` handles all supported OS environments. # Test: Search for the function definition and usage. Expect: Proper handling for each OS. rg --type cs $'GetDriversPathPerOS'Length of output: 689
Script:
#!/bin/bash # Description: Inspect the implementation of `GetDriversPathPerOS` to verify handling of different OS environments. # Test: Extract the function implementation to see if it includes specific handling for different OS environments. rg --type cs --context 10 'public string GetDriversPathPerOS()'Length of output: 2469
Script:
#!/bin/bash # Description: Further inspect the implementation of `GetDriversPathPerOS` to verify handling of macOS and Linux environments. # Test: Extract more of the function implementation to see if it includes specific handling for macOS and Linux OS environments. rg --type cs --context 20 'public string GetDriversPathPerOS()'Length of output: 4794
public ITouchAction BuildTouchAction(AppiumDriver driver, double startX, double startY, double endX, double endY, int waitDuration = 200) | ||
{ | ||
ITouchAction touchAction; | ||
|
||
if (DevicePlatformType == eDevicePlatformType.Android) | ||
{ | ||
touchAction = new TouchAction(driver) | ||
.Press(startX, startY) | ||
.MoveTo(endX, endY) | ||
.Release(); | ||
} | ||
else //iOS | ||
{ | ||
touchAction = new TouchAction(driver) | ||
.Press(startX, startY) | ||
.Wait(waitDuration) | ||
.MoveTo(endX, endY) | ||
.Release(); | ||
} | ||
|
||
touchAction = new TouchAction(driver) | ||
.Press(startX, startY) | ||
.Wait(waitDuration) | ||
.MoveTo(endX, endY) | ||
.Release(); |
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.
Refactor BuildTouchAction
to enhance readability and maintainability.
- touchAction = new TouchAction(driver)
- .Press(startX, startY)
- .Wait(waitDuration)
- .MoveTo(endX, endY)
- .Release();
+ touchAction = new TouchAction(driver)
+ .Press(startX, startY)
+ .Wait(waitDuration)
+ .MoveTo(endX, endY)
+ .Release();
Adjust the indentation for better readability and ensure that each action in the chain is on a new line.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
public ITouchAction BuildTouchAction(AppiumDriver driver, double startX, double startY, double endX, double endY, int waitDuration = 200) | |
{ | |
ITouchAction touchAction; | |
if (DevicePlatformType == eDevicePlatformType.Android) | |
{ | |
touchAction = new TouchAction(driver) | |
.Press(startX, startY) | |
.MoveTo(endX, endY) | |
.Release(); | |
} | |
else //iOS | |
{ | |
touchAction = new TouchAction(driver) | |
.Press(startX, startY) | |
.Wait(waitDuration) | |
.MoveTo(endX, endY) | |
.Release(); | |
} | |
touchAction = new TouchAction(driver) | |
.Press(startX, startY) | |
.Wait(waitDuration) | |
.MoveTo(endX, endY) | |
.Release(); | |
public ITouchAction BuildTouchAction(AppiumDriver driver, double startX, double startY, double endX, double endY, int waitDuration = 200) | |
{ | |
ITouchAction touchAction; | |
touchAction = new TouchAction(driver) | |
.Press(startX, startY) | |
.Wait(waitDuration) | |
.MoveTo(endX, endY) | |
.Release(); |
@@ -682,7 +682,7 @@ public override void StartDriver() | |||
|
|||
SetCurrentPageLoadStrategy(ieOptions); | |||
ieOptions.IgnoreZoomLevel = true; | |||
driverService = InternetExplorerDriverService.CreateDefaultService(); | |||
driverService = InternetExplorerDriverService.CreateDefaultService(GetDriversPathPerOS()); |
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.
Consider the implications of setting IgnoreZoomLevel
to true, as it might affect element interaction accuracy on web pages not set to 100% zoom.
Thank you for your contribution.
Before submitting this PR, please make sure: