Selenium Upgrade and AI Related changes#4287
Conversation
WalkthroughConsolidates AI/auto-learn indicators into a single read-only LearnedType, removes AI-row UI styling and AI loader image, hardens GenAI JSON/reflection handling, adds configurable AIBatchSize, and upgrades Selenium DevTools to V139 with package bumps. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as POM UI / Wizard
participant General as General.GetAIBatchsize()
participant GPEM as GingerPlayEndPointManager
participant POMU as POMUtils.SendInBatchesList
User->>UI: Start GenAI processing
UI->>General: GetAIBatchsize()
General->>GPEM: GetAIBatchsize()
GPEM-->>General: AIBatchSize (string)
General-->>UI: AIBatchSize (string)
UI->>POMU: SendInBatchesList(items, defaultBatch)
note right of POMU #f9f9f9: If AIBatchSize provided,\noverride batch size before sending
POMU-->>UI: Batch processing results
sequenceDiagram
autonumber
participant Caller as POMUtils
participant JSON as JSON Parser
participant Model as ElementWrapper/Locator
Caller->>JSON: Parse cleanedResponse (try)
alt contains data.genai_result
JSON-->>Caller: genai_result token
Caller->>JSON: Deserialize List<ElementWrapper>
else parse fails or missing token
JSON-->>Caller: JsonException or missing token
Caller->>JSON: Fallback parse from cleanedResponse inner payload
end
loop EnhanceLocatorsByAI entries
alt kvp.Value not null/empty
Caller->>Model: Create locator object and add to element
else
Caller-->>Model: Skip empty entry
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (11)📚 Learning: 2025-07-10T07:11:28.974ZApplied to files:
📚 Learning: 2025-08-25T09:27:30.249ZApplied to files:
📚 Learning: 2024-12-04T11:45:57.024ZApplied to files:
📚 Learning: 2025-06-24T06:08:31.804ZApplied to files:
📚 Learning: 2025-07-16T14:17:56.429ZApplied to files:
📚 Learning: 2025-08-22T16:22:20.870ZApplied to files:
📚 Learning: 2024-06-12T12:54:44.221ZApplied to files:
📚 Learning: 2025-08-25T09:20:17.608ZApplied to files:
📚 Learning: 2024-07-18T09:05:15.264ZApplied to files:
📚 Learning: 2024-07-08T13:53:26.335ZApplied to files:
📚 Learning: 2025-06-16T10:37:13.073ZApplied to files:
🧬 Code graph analysis (1)Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (2)
🔇 Additional comments (6)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 14
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (5)
Ginger/Ginger/WizardLib/WizardWindow.xaml.cs (2)
162-181: Navigation gating ignores AI processing state—block when xAIProcessingText is visible.Now that AI flows only toggle the text, users can navigate while processing. Include the text control in the checks.
- if (xProcessingImage.Visibility == Visibility.Visible) + if (xProcessingImage.Visibility == Visibility.Visible || xAIProcessingText.Visibility == Visibility.Visible) { Reporter.ToUser(eUserMsgKey.WizardCantMoveWhileInProcess, "Next"); }Apply the same change in Prev, Cancel, and Finish click handlers.
Also applies to: 296-303, 313-316, 339-345
456-479: Timer lifecycle: guard against double-start and detach handler on stop.Repeated AIProcessStarted calls can stack timers. Stop/dispose previous before starting a new one; detach handler when stopping.
private void StartAIFineTuneTimer() { + // Stop previous timer if any + if (AIFineTunetimer != null) + { + try { AIFineTunetimer.Stop(); AIFineTunetimer.Tick -= AIFineTuneTimer_Tick; } + catch { /* ignore */ } + } // Create and configure the DispatcherTimer AIFineTunetimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) // Update every second }; AIFineTunetimer.Tick += AIFineTuneTimer_Tick; @@ private void AIFineTuneStopTimer() { if (AIFineTunetimer != null) { try { - AIFineTunetimer.Stop(); + AIFineTunetimer.Stop(); + AIFineTunetimer.Tick -= AIFineTuneTimer_Tick; // Reset label to base text when stopping if (!string.IsNullOrWhiteSpace(AIFineTuneBaseText)) { xAIProcessingText.Text = AIFineTuneBaseText; } } catch (Exception ex) { Reporter.ToLog(eLogLevel.DEBUG, "Error while stopping the timer", ex); } + finally + { + AIFineTunetimer = null; + } } }Also applies to: 491-509
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/POM/POMUtils.cs (3)
101-108: Avoid Convert.ToInt32 on arbitrary config; validate and clamp batch size.Invalid or tiny values will throw or degrade. Use TryParse with sane minimum.
- batchSize = !string.IsNullOrEmpty(GingerCoreNET.GeneralLib.General.GetAIBatchsize()) ? Convert.ToInt32(GingerCoreNET.GeneralLib.General.GetAIBatchsize()) : batchSize; + var cfg = GingerCoreNET.GeneralLib.General.GetAIBatchsize(); + if (!string.IsNullOrWhiteSpace(cfg) && int.TryParse(cfg, out var parsed) && parsed > 0) + { + // enforce a lower bound to avoid excessive calls + batchSize = Math.Max(parsed, 512); + }
190-198: Possible NRE: ToString() on null JToken.jObject["data"]?["genai_result"] can be null; calling ToString() will throw. Check token first.
- var jObject = JObject.Parse(cleanedResponse); - var genaiResultToken = jObject["data"]?["genai_result"].ToString(); - if (genaiResultToken != null) + var jObject = JObject.Parse(cleanedResponse); + var genaiResultToken = jObject["data"]?["genai_result"]; + if (genaiResultToken != null) { - responseElements = JsonConvert.DeserializeObject<List<ElementWrapper>>((string)genaiResultToken); + responseElements = JsonConvert.DeserializeObject<List<ElementWrapper>>(genaiResultToken.ToString()); } else { responseElements = JsonConvert.DeserializeObject<List<ElementWrapper>>(cleanedResponse); }
241-264: De-dup locators and consider LearnedType semantics.Prevent duplicates and avoid setting both IsAutoLearned and IsAIGenerated; LearnedType will show AI if IsAIGenerated is true.
- if(!string.IsNullOrEmpty(kvp.Value)) + if (!string.IsNullOrEmpty(kvp.Value)) { - var locator = new ElementLocator + // skip duplicates + bool exists = existingElement.Locators.Any(l => + l.LocateBy == locateBy && + string.Equals(l.LocateValue, kvp.Value, StringComparison.Ordinal)); + if (exists) { continue; } + + var locator = new ElementLocator { LocateBy = locateBy, LocateValue = kvp.Value, - IsAutoLearned = true, + IsAutoLearned = false, Category = PomCategory, IsAIGenerated = true, Active = true }; existingElement.Locators.Add(locator); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (13)
Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml(3 hunks)Ginger/Ginger/ApplicationModelsLib/POMModels/PomElementsPage.xaml(0 hunks)Ginger/Ginger/ApplicationModelsLib/POMModels/PomElementsPage.xaml.cs(1 hunks)Ginger/Ginger/UserControlsLib/UCElementDetails.xaml(0 hunks)Ginger/Ginger/WizardLib/WizardWindow.xaml(1 hunks)Ginger/Ginger/WizardLib/WizardWindow.xaml.cs(2 hunks)Ginger/GingerCoreCommon/UIElement/ElementLocator.cs(1 hunks)Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/POM/POMUtils.cs(7 hunks)Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs(5 hunks)Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs(2 hunks)Ginger/GingerCoreNET/GeneralLib/ElementWrapperInfo.cs(0 hunks)Ginger/GingerCoreNET/GeneralLib/General.cs(2 hunks)Ginger/GingerCoreNET/GingerCoreNET.csproj(1 hunks)
💤 Files with no reviewable changes (3)
- Ginger/GingerCoreNET/GeneralLib/ElementWrapperInfo.cs
- Ginger/Ginger/UserControlsLib/UCElementDetails.xaml
- Ginger/Ginger/ApplicationModelsLib/POMModels/PomElementsPage.xaml
🧰 Additional context used
🧠 Learnings (8)
📚 Learning: 2025-07-16T14:42:32.229Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4254
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml.cs:70-73
Timestamp: 2025-07-16T14:42:32.229Z
Learning: In Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml.cs, prashelke prefers to keep the current `!WorkSpace.Instance.BetaFeatures.ShowPOMForAI` logic for binding and showing AI POM controls, rather than changing it to positive logic.
Applied to files:
Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xamlGinger/Ginger/WizardLib/WizardWindow.xamlGinger/Ginger/ApplicationModelsLib/POMModels/PomElementsPage.xaml.cs
📚 Learning: 2025-08-22T14:57:03.711Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4280
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml:71-103
Timestamp: 2025-08-22T14:57:03.711Z
Learning: In Ginger POM wizard, prashelke prefers to show AI-powered features as visible to users but disabled by default (Visibility="Visible", IsEnabled="False") to promote feature discoverability rather than hiding them completely. Users should be able to see what AI capabilities are available even when not yet enabled.
Applied to files:
Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml
📚 Learning: 2025-08-22T16:53:46.055Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4280
File: Ginger/Ginger/WizardLib/WizardWindow.xaml:141-149
Timestamp: 2025-08-22T16:53:46.055Z
Learning: In the Ginger WPF application, dynamic text resources like "AI_FineTuning_Processing_Text" are not present in the resource dictionaries, so hard-coded text should be used as fallback when localization resources are not available.
Applied to files:
Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml
📚 Learning: 2025-06-16T10:37:13.073Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4232
File: Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs:19-22
Timestamp: 2025-06-16T10:37:13.073Z
Learning: In Ginger codebase, both `using amdocs.ginger.GingerCoreNET;` and `using Amdocs.Ginger.CoreNET;` are valid and serve different purposes. The first (lowercase) contains the WorkSpace class and related workspace functionality, while the second (proper case) contains drivers like GenericAppiumDriver and other core functionality. Both may be required in files that use types from both namespaces.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2024-07-26T22:04:12.930Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#3429
File: Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs:1123-1126
Timestamp: 2024-07-26T22:04:12.930Z
Learning: The user has removed an unnecessary empty line at 1123 in `WindowExplorerPage.xaml.cs` for better code compactness.
Applied to files:
Ginger/Ginger/WizardLib/WizardWindow.xaml
📚 Learning: 2025-04-25T13:29:45.059Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/POM/POMUtils.cs
📚 Learning: 2025-06-16T09:52:40.873Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4232
File: Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs:19-22
Timestamp: 2025-06-16T09:52:40.873Z
Learning: The `GenericAppiumDriver` class is located in the `Amdocs.Ginger.CoreNET` namespace, not in a namespace that matches its file path structure. File paths don't always correspond to namespace declarations in this codebase.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/POM/POMUtils.cs
📚 Learning: 2025-04-25T13:29:45.059Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/POM/POMUtils.cs
🧬 Code graph analysis (5)
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (1)
Ginger/GingerCoreNET/GeneralLib/General.cs (1)
GetAIBatchsize(1481-1484)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (1)
Ginger/GingerCoreCommon/Actions/Web/ActBrowserElement.cs (1)
ActBrowserElement(32-402)
Ginger/GingerCoreNET/GeneralLib/General.cs (1)
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (2)
GetAIBatchsize(251-254)GingerPlayEndPointManager(27-255)
Ginger/Ginger/ApplicationModelsLib/POMModels/PomElementsPage.xaml.cs (1)
Ginger/GingerCoreCommon/UIElement/ElementLocator.cs (1)
ElementLocator(25-196)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/POM/POMUtils.cs (3)
Ginger/GingerCoreNET/GeneralLib/ElementWrapperInfo.cs (1)
ElementwrapperProperties(47-105)Ginger/GingerCoreNET/GeneralLib/General.cs (2)
General(59-1487)GetAIBatchsize(1481-1484)Ginger/GingerCoreCommon/UIElement/ElementLocator.cs (1)
ElementLocator(25-196)
🔇 Additional comments (5)
Ginger/GingerCoreNET/GingerCoreNET.csproj (1)
335-336: Update DevTools usage for Selenium 4.35.0
- Remove version-specific DevTools typed namespace aliases in Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:79-80 (currently pointing to OpenQA.Selenium.DevTools.V139) and switch to dynamic DevToolsSession domains per the latest API.
- Verify all GetDevToolsSession() calls match the updated method signature in Selenium.WebDriver 4.35.0.
- No changes needed for Selenium.Support references—OpenQA.Selenium.Support.UI usages confirm the package is required.
⛔ Skipped due to learnings
Learnt from: prashelke PR: Ginger-Automation/Ginger#4249 File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:4684-4695 Timestamp: 2025-07-10T07:11:28.974Z Learning: In Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs, attribute values used in CSS selectors (e.g., ByTitle, ByAriaLabel, ByDataTestId, ByPlaceholder) should be escaped using a helper method (such as EscapeCssAttributeValue) to prevent selector breakage due to special characters.Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml (2)
71-71: Good UX: tooltip clarifies prerequisites.Aligned with your preference to keep AI features visible but disabled by default.
85-96: Label/content rename is clear and consistent.No behavior change; reads better.
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (1)
11810-11813: Good: Disable() awaited and session disposed.Awaiting Network.Disable and closing the DevTools session is correct and consistent with the API. (selenium.dev)
Ginger/GingerCoreNET/GeneralLib/General.cs (1)
52-52: OK: add System.Text.Json.Needed for the JsonSerializer usage in this class.
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml (1)
93-101: Gate enablement via feature flags, not hardcoded
POMLearnConfigWizardPage.xaml (lines 93–101): replaceIsEnabled="False"on thexLearnPOMByAICheckBox with a binding to the runtime flags (e.g.WorkSpace.Instance.BetaFeatures.ShowPOMForAIand your Ginger Play configuration status) so it only enables when both are true.
♻️ Duplicate comments (2)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (1)
11640-11645: Good await on Network.Enable; add defensive guards for devtools availability.Avoids flaky races; consider an early skip when DevTools session/domains aren’t available to prevent null dereferences on odd drivers.
- devToolsSession = devTools.GetDevToolsSession(); - devToolsDomains = devToolsSession.GetVersionSpecificDomains<DevToolsDomains>(); + if (devTools == null) + { + mAct.ExInfo = $"DevTools not available for {mBrowserType}; skipping {mAct?.ControlAction}."; + mAct.Status = Amdocs.Ginger.CoreNET.Execution.eRunStatus.Skipped; + return; + } + devToolsSession = devTools.GetDevToolsSession(); + devToolsDomains = devToolsSession.GetVersionSpecificDomains<DevToolsDomains>(); + if (devToolsDomains == null) + { + Reporter.ToLog(eLogLevel.WARN, "DevTools V139 domains unavailable; skipping operation."); + mAct.Status = Amdocs.Ginger.CoreNET.Execution.eRunStatus.Skipped; + return; + }Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (1)
43-44: Optional: expose a typed accessor for safer consumers.Repeated from earlier feedback; fine to keep string API, but a typed TryGet helps avoid scattered parsing and bad defaults.
public static bool TryGetAIBatchSize(out int batchSize) { if (int.TryParse(AIBatchSize, out var v) && v > 0) { batchSize = v; return true; } batchSize = 0; return false; }Also applies to: 251-254
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml(3 hunks)Ginger/GingerCoreCommon/UIElement/ElementLocator.cs(2 hunks)Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs(5 hunks)Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs(2 hunks)
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2025-07-16T14:42:32.229Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4254
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml.cs:70-73
Timestamp: 2025-07-16T14:42:32.229Z
Learning: In Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml.cs, prashelke prefers to keep the current `!WorkSpace.Instance.BetaFeatures.ShowPOMForAI` logic for binding and showing AI POM controls, rather than changing it to positive logic.
Applied to files:
Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml
📚 Learning: 2025-08-22T14:57:03.711Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4280
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml:71-103
Timestamp: 2025-08-22T14:57:03.711Z
Learning: In Ginger POM wizard, prashelke prefers to show AI-powered features as visible to users but disabled by default (Visibility="Visible", IsEnabled="False") to promote feature discoverability rather than hiding them completely. Users should be able to see what AI capabilities are available even when not yet enabled.
Applied to files:
Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml
📚 Learning: 2025-08-26T07:40:08.345Z
Learnt from: AmanPrasad43
PR: Ginger-Automation/Ginger#4285
File: Ginger/Ginger/Actions/ActionEditPages/ActSecurityTestingEditPage.xaml:23-23
Timestamp: 2025-08-26T07:40:08.345Z
Learning: In the Ginger codebase ActSecurityTestingEditPage.xaml file, the large bottom margin of 530 on the "Acceptable Alerts" label (Margin="10,10,0,530") is intentional design choice, not an error.
Applied to files:
Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml
📚 Learning: 2025-08-25T09:27:30.249Z
Learnt from: AmanPrasad43
PR: Ginger-Automation/Ginger#4281
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:1433-1441
Timestamp: 2025-08-25T09:27:30.249Z
Learning: In Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs, SetProxy(dynamic options) should not force options.AcceptInsecureCertificates = false. Only set AcceptInsecureCertificates = true when UseZAP is enabled to avoid breaking setups that permit self-signed/dev certificates.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2024-12-04T11:45:57.024Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4017
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:11096-11096
Timestamp: 2024-12-04T11:45:57.024Z
Learning: In the `OnNetworkRequestSent` method in `SeleniumDriver.cs`, adding a null check for `_BrowserHelper` is not necessary.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-07-10T07:11:28.974Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4249
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:4684-4695
Timestamp: 2025-07-10T07:11:28.974Z
Learning: In Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs, attribute values used in CSS selectors (e.g., ByTitle, ByAriaLabel, ByDataTestId, ByPlaceholder) should be escaped using a helper method (such as EscapeCssAttributeValue) to prevent selector breakage due to special characters.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-06-16T10:37:13.073Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4232
File: Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs:19-22
Timestamp: 2025-06-16T10:37:13.073Z
Learning: In Ginger codebase, both `using amdocs.ginger.GingerCoreNET;` and `using Amdocs.Ginger.CoreNET;` are valid and serve different purposes. The first (lowercase) contains the WorkSpace class and related workspace functionality, while the second (proper case) contains drivers like GenericAppiumDriver and other core functionality. Both may be required in files that use types from both namespaces.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
🧬 Code graph analysis (2)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (1)
Ginger/GingerCoreCommon/Actions/Web/ActBrowserElement.cs (1)
ActBrowserElement(32-402)
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (1)
Ginger/GingerCoreNET/GeneralLib/General.cs (1)
GetAIBatchsize(1481-1484)
🔇 Additional comments (5)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (3)
79-80: CDP v139 aliases look correct.Using typed DevTools V139 domains is aligned with the Selenium upgrade. No action needed.
4642-4642: Whitespace-only change.No functional impact; ignoring.
11699-11704: Awaiting SetBlockedURLs is the right fix.Deterministic ordering and surfaced errors without the arbitrary sleep. LGTM.
Ginger/GingerCoreCommon/UIElement/ElementLocator.cs (1)
63-67: Good: LearnedType now refreshes when flags change.Raising PropertyChanged for LearnedType in both IsAutoLearned and IsAIGenerated setters is correct and fixes stale UI.
Also applies to: 176-180
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (1)
43-44: Trim AIBatchSize at load time to guard against whitespace-only entries
Avoid downstreamFormatExceptionwhen the config value contains only whitespace (numeric strings with surrounding whitespace still parse correctly).- private static readonly string AIBatchSize = System.Configuration.ConfigurationManager.AppSettings["AIBatchSize"]?.ToString() ?? "2000"; + private static readonly string AIBatchSize = + ((System.Configuration.ConfigurationManager.AppSettings["AIBatchSize"]?.ToString()) ?? "2000").Trim();
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (3)
Ginger/GingerCoreCommon/UIElement/ElementLocator.cs (2)
63-67: Also raise PropertyChanged for LearnedTypeEnum.You correctly notify for LearnedType; include LearnedTypeEnum to keep enum bindings (present/future) in sync.
- public bool IsAutoLearned - { - get { return mIsAutoLearned; } - set { if (mIsAutoLearned != value) { mIsAutoLearned = value; OnPropertyChanged(nameof(IsAutoLearned)); OnPropertyChanged(nameof(LearnedType)); } } - } + public bool IsAutoLearned + { + get { return mIsAutoLearned; } + set + { + if (mIsAutoLearned != value) + { + mIsAutoLearned = value; + OnPropertyChanged(nameof(IsAutoLearned)); + OnPropertyChanged(nameof(LearnedType)); + OnPropertyChanged(nameof(LearnedTypeEnum)); + } + } + }
178-180: Mirror the enum notification here as well.Same rationale as above; add LearnedTypeEnum change notification.
- public bool IsAIGenerated { get { return mIsAIGenerated; } set { if (mIsAIGenerated != value) { mIsAIGenerated = value; OnPropertyChanged(nameof(IsAIGenerated)); OnPropertyChanged(nameof(LearnedType)); } } } + public bool IsAIGenerated + { + get { return mIsAIGenerated; } + set + { + if (mIsAIGenerated != value) + { + mIsAIGenerated = value; + OnPropertyChanged(nameof(IsAIGenerated)); + OnPropertyChanged(nameof(LearnedType)); + OnPropertyChanged(nameof(LearnedTypeEnum)); + } + } + }Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (1)
79-80: CDP v139 aliasing OK; consider explicit alias names (optional).Aliases work; if you want extra clarity, rename to DevToolsV139Domains/DevToolsV139.
-using DevToolsDomains = OpenQA.Selenium.DevTools.V139.DevToolsSessionDomains; -using DevToolsVersion = OpenQA.Selenium.DevTools.V139; +using DevToolsV139Domains = OpenQA.Selenium.DevTools.V139.DevToolsSessionDomains; +using DevToolsV139 = OpenQA.Selenium.DevTools.V139;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
Ginger/GingerCoreCommon/UIElement/ElementLocator.cs(2 hunks)Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs(5 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-08-25T09:27:30.249Z
Learnt from: AmanPrasad43
PR: Ginger-Automation/Ginger#4281
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:1433-1441
Timestamp: 2025-08-25T09:27:30.249Z
Learning: In Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs, SetProxy(dynamic options) should not force options.AcceptInsecureCertificates = false. Only set AcceptInsecureCertificates = true when UseZAP is enabled to avoid breaking setups that permit self-signed/dev certificates.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2024-12-04T11:45:57.024Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4017
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:11096-11096
Timestamp: 2024-12-04T11:45:57.024Z
Learning: In the `OnNetworkRequestSent` method in `SeleniumDriver.cs`, adding a null check for `_BrowserHelper` is not necessary.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-07-10T07:11:28.974Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4249
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:4684-4695
Timestamp: 2025-07-10T07:11:28.974Z
Learning: In Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs, attribute values used in CSS selectors (e.g., ByTitle, ByAriaLabel, ByDataTestId, ByPlaceholder) should be escaped using a helper method (such as EscapeCssAttributeValue) to prevent selector breakage due to special characters.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-06-16T10:37:13.073Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4232
File: Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs:19-22
Timestamp: 2025-06-16T10:37:13.073Z
Learning: In Ginger codebase, both `using amdocs.ginger.GingerCoreNET;` and `using Amdocs.Ginger.CoreNET;` are valid and serve different purposes. The first (lowercase) contains the WorkSpace class and related workspace functionality, while the second (proper case) contains drivers like GenericAppiumDriver and other core functionality. Both may be required in files that use types from both namespaces.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-07-16T14:42:32.229Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4254
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml.cs:70-73
Timestamp: 2025-07-16T14:42:32.229Z
Learning: In Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml.cs, prashelke prefers to keep the current `!WorkSpace.Instance.BetaFeatures.ShowPOMForAI` logic for binding and showing AI POM controls, rather than changing it to positive logic.
Applied to files:
Ginger/GingerCoreCommon/UIElement/ElementLocator.cs
🧬 Code graph analysis (1)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (1)
Ginger/GingerCoreCommon/Actions/Web/ActBrowserElement.cs (1)
ActBrowserElement(32-402)
🔇 Additional comments (4)
Ginger/GingerCoreCommon/UIElement/ElementLocator.cs (1)
182-196: Enum + consolidated LearnedType: LGTM.Clear precedence (AI > Auto > Manual) and non-breaking string property. Good upgrade for UI binding.
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (3)
4642-4642: No functional change here.Whitespace-only change; nothing to do.
11699-11704: Awaiting SetBlockedURLs is correct.This removes race conditions and makes behavior deterministic.
11809-11818: Teardown guards look good.Null-checks and disposing the session prevent NREs during cleanup.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (1)
4373-4450: Guard against malformed/empty POM key to avoid exceptions
GetCurrentPOMconstructsPOMExecutionUtilswith whateverRetrieveActionValue(act)returns. If this is null/empty or not in the expected "POMGUID_ElementGUID" shape, downstream code can throw (e.g.,.ToString()on null ornew Guid(...)on bad input). Add a defensive check and structured logging.Apply:
- private static void GetCurrentPOM(Act act, out POMExecutionUtils pomExcutionUtil, out ApplicationPOMModel currentPOM) - { - pomExcutionUtil = new POMExecutionUtils(act, RetrieveActionValue(act)); - currentPOM = pomExcutionUtil.GetCurrentPOM(); - } + private static void GetCurrentPOM(Act act, out POMExecutionUtils pomExcutionUtil, out ApplicationPOMModel currentPOM) + { + pomExcutionUtil = null; + currentPOM = null; + var pomKey = RetrieveActionValue(act); + if (string.IsNullOrWhiteSpace(pomKey) || !pomKey.Contains("_")) + { + Reporter.ToLog(eLogLevel.WARN, $"POM key is missing or malformed for action '{act?.Description}'. Expected 'POMGUID_ElementGUID', got '{pomKey ?? "<null>"}'."); + return; + } + try + { + pomExcutionUtil = new POMExecutionUtils(act, pomKey); + currentPOM = pomExcutionUtil.GetCurrentPOM(); + } + catch (Exception ex) + { + Reporter.ToLog(eLogLevel.ERROR, "Failed to resolve current POM from action.", ex); + pomExcutionUtil = null; + currentPOM = null; + } + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs(8 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-08-25T09:27:30.249Z
Learnt from: AmanPrasad43
PR: Ginger-Automation/Ginger#4281
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:1433-1441
Timestamp: 2025-08-25T09:27:30.249Z
Learning: In Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs, SetProxy(dynamic options) should not force options.AcceptInsecureCertificates = false. Only set AcceptInsecureCertificates = true when UseZAP is enabled to avoid breaking setups that permit self-signed/dev certificates.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2024-12-04T11:45:57.024Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4017
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:11096-11096
Timestamp: 2024-12-04T11:45:57.024Z
Learning: In the `OnNetworkRequestSent` method in `SeleniumDriver.cs`, adding a null check for `_BrowserHelper` is not necessary.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-07-10T07:11:28.974Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4249
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:4684-4695
Timestamp: 2025-07-10T07:11:28.974Z
Learning: In Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs, attribute values used in CSS selectors (e.g., ByTitle, ByAriaLabel, ByDataTestId, ByPlaceholder) should be escaped using a helper method (such as EscapeCssAttributeValue) to prevent selector breakage due to special characters.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-06-16T10:37:13.073Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4232
File: Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs:19-22
Timestamp: 2025-06-16T10:37:13.073Z
Learning: In Ginger codebase, both `using amdocs.ginger.GingerCoreNET;` and `using Amdocs.Ginger.CoreNET;` are valid and serve different purposes. The first (lowercase) contains the WorkSpace class and related workspace functionality, while the second (proper case) contains drivers like GenericAppiumDriver and other core functionality. Both may be required in files that use types from both namespaces.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
🧬 Code graph analysis (1)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (2)
Ginger/GingerCoreNET/Application Models/Execution/POM/POMExecutionUtils.cs (8)
POMExecutionUtils(34-530)POMExecutionUtils(39-50)POMExecutionUtils(52-55)POMExecutionUtils(57-61)ApplicationPOMModel(65-77)ElementInfo(79-98)ElementInfo(100-128)ElementInfo(130-141)Ginger/GingerCoreCommon/Repository/ApplicationModelLib/POMModelLib/ApplicationPOMModel.cs (2)
ApplicationPOMModel(39-386)ApplicationPOMModel(41-44)
🔇 Additional comments (4)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (4)
79-80: CDP v139 aliasing: OKAliases point to V139 as intended. No further action.
4648-4648: No-op whitespace changeNothing to address.
11854-11863: DevTools teardown null-guard: OKProperly avoids NREs during cleanup. Nothing else to change.
11673-11690: Remove redundantdevToolsnull check
Theif (webDriver is ChromiumDriver)guard ensuresdevTools = webDriver as IDevToolscan never be null (allChromiumDriverinstances implementIDevTools), so the suggested null-check beforedevTools.GetDevToolsSession()is unnecessary.Likely an incorrect or invalid review comment.
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Ginger/Ginger/ApplicationModelsLib/POMModels/PomAllElementsPage.xaml.cs (1)
420-438: Move FontWeight assignment into the if/else so only the selected tab is bold
CurrentlyFontWeights.Boldis applied unconditionally after the if/else, causing all tabs to render bold. AssignFontWeights.Boldfor the selected tab andFontWeights.Normalfor others:- if (xPOMModelTabs.SelectedItem == tab) - { - ((TextBlock)ctrl).Foreground = (SolidColorBrush)FindResource("$SelectionColor_Pink"); - } - else - { - ((TextBlock)ctrl).Foreground = (SolidColorBrush)FindResource("$PrimaryColor_Black"); - } ((TextBlock)ctrl).FontWeight = FontWeights.Bold; + if (xPOMModelTabs.SelectedItem == tab) + { + ((TextBlock)ctrl).Foreground = (SolidColorBrush)FindResource("$SelectionColor_Pink"); + ((TextBlock)ctrl).FontWeight = FontWeights.Bold; + } + else + { + ((TextBlock)ctrl).Foreground = (SolidColorBrush)FindResource("$PrimaryColor_Black"); + ((TextBlock)ctrl).FontWeight = FontWeights.Normal; + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
Ginger/Ginger/ApplicationModelsLib/POMModels/PomAllElementsPage.xaml.cs(1 hunks)Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs(9 hunks)
🧰 Additional context used
🧠 Learnings (11)
📚 Learning: 2024-07-26T22:04:12.930Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#3429
File: Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs:1123-1126
Timestamp: 2024-07-26T22:04:12.930Z
Learning: The user has removed an unnecessary empty line at 1123 in `WindowExplorerPage.xaml.cs` for better code compactness.
Applied to files:
Ginger/Ginger/ApplicationModelsLib/POMModels/PomAllElementsPage.xaml.cs
📚 Learning: 2025-07-16T14:42:32.229Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4254
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml.cs:70-73
Timestamp: 2025-07-16T14:42:32.229Z
Learning: In Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/POMLearnConfigWizardPage.xaml.cs, prashelke prefers to keep the current `!WorkSpace.Instance.BetaFeatures.ShowPOMForAI` logic for binding and showing AI POM controls, rather than changing it to positive logic.
Applied to files:
Ginger/Ginger/ApplicationModelsLib/POMModels/PomAllElementsPage.xaml.cs
📚 Learning: 2025-08-25T09:27:30.249Z
Learnt from: AmanPrasad43
PR: Ginger-Automation/Ginger#4281
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:1433-1441
Timestamp: 2025-08-25T09:27:30.249Z
Learning: In Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs, SetProxy(dynamic options) should not force options.AcceptInsecureCertificates = false. Only set AcceptInsecureCertificates = true when UseZAP is enabled to avoid breaking setups that permit self-signed/dev certificates.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-07-10T07:11:28.974Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4249
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:4684-4695
Timestamp: 2025-07-10T07:11:28.974Z
Learning: In Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs, attribute values used in CSS selectors (e.g., ByTitle, ByAriaLabel, ByDataTestId, ByPlaceholder) should be escaped using a helper method (such as EscapeCssAttributeValue) to prevent selector breakage due to special characters.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2024-12-04T11:45:57.024Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4017
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:11096-11096
Timestamp: 2024-12-04T11:45:57.024Z
Learning: In the `OnNetworkRequestSent` method in `SeleniumDriver.cs`, adding a null check for `_BrowserHelper` is not necessary.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-06-24T06:08:31.804Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4242
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Playwright/PlaywrightBrowserTab.cs:623-656
Timestamp: 2025-06-24T06:08:31.804Z
Learning: In Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Playwright/PlaywrightBrowserTab.cs, the CSS selector construction by directly interpolating user input values in the GetElementLocator method is considered acceptable by the team and working as expected for their use cases.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-07-16T14:17:56.429Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4254
File: Ginger/GingerCoreNET/GeneralLib/ElementWrapperInfo.cs:89-93
Timestamp: 2025-07-16T14:17:56.429Z
Learning: In Ginger/GingerCoreNET/GeneralLib/ElementWrapperInfo.cs, the user prashelke prefers to keep the current casing for properties `insideIframe` and `insideShadowDOM` in the `ElementwrapperContext` class rather than changing them to PascalCase.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-08-22T16:22:20.870Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4280
File: Ginger/GingerCoreNET/GeneralLib/ElementWrapperInfo.cs:41-41
Timestamp: 2025-08-22T16:22:20.870Z
Learning: In Ginger/GingerCoreNET/GeneralLib/ElementWrapperInfo.cs, the user prashelke prefers to keep the current lowercase naming for properties like `elementGuid` rather than changing them to PascalCase, likely for consistency within the ElementWrapperInfo data model classes.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2024-06-12T12:54:44.221Z
Learnt from: IamRanjeetSingh
PR: Ginger-Automation/Ginger#3753
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Playwright/PlaywrightBrowserTab.cs:99-99
Timestamp: 2024-06-12T12:54:44.221Z
Learning: User IamRanjeetSingh prefers exceptions to propagate rather than being caught and handled locally within methods in `PlaywrightBrowserTab.cs`.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-08-25T09:20:17.608Z
Learnt from: AmanPrasad43
PR: Ginger-Automation/Ginger#4281
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs:1958-1970
Timestamp: 2025-08-25T09:20:17.608Z
Learning: In Ginger security testing, passive ZAP scans should be invoked with an empty testURL (ActSecurityTesting.ExecutePassiveZapScan("", act)) to aggregate alerts across the entire ZAP session. Passing a URL scopes results to that base URL. Only the active scan path should pass Driver.Url, with null/empty checks. Context: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs :: ActSecurity. Confirmed by AmanPrasad43 in PR #4281.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
📚 Learning: 2025-06-16T10:37:13.073Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4232
File: Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs:19-22
Timestamp: 2025-06-16T10:37:13.073Z
Learning: In Ginger codebase, both `using amdocs.ginger.GingerCoreNET;` and `using Amdocs.Ginger.CoreNET;` are valid and serve different purposes. The first (lowercase) contains the WorkSpace class and related workspace functionality, while the second (proper case) contains drivers like GenericAppiumDriver and other core functionality. Both may be required in files that use types from both namespaces.
Applied to files:
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
🧬 Code graph analysis (1)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (5)
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Playwright/PlaywrightDriver.cs (11)
OpenQA(1925-1928)Act(429-513)ElementInfo(757-834)ElementInfo(1254-1287)ElementInfo(1298-1343)ElementInfo(1389-1400)ElementInfo(1402-1407)ElementInfo(1409-1417)ElementInfo(1433-1478)ElementInfo(1528-1557)ElementInfo(1559-1588)Ginger/GingerCoreNET/Application Models/Execution/POM/POMExecutionUtils.cs (8)
POMExecutionUtils(34-530)POMExecutionUtils(39-50)POMExecutionUtils(52-55)POMExecutionUtils(57-61)ApplicationPOMModel(65-77)ElementInfo(79-98)ElementInfo(100-128)ElementInfo(130-141)Ginger/GingerCoreCommon/Repository/ApplicationModelLib/POMModelLib/ApplicationPOMModel.cs (2)
ApplicationPOMModel(39-386)ApplicationPOMModel(41-44)Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
Reporter(28-357)Ginger/GingerCoreCommon/Actions/Act.cs (1)
AddOrUpdateReturnParamActual(1308-1335)
🔇 Additional comments (3)
Ginger/Ginger/ApplicationModelsLib/POMModels/PomAllElementsPage.xaml.cs (1)
167-169: Verify use of IsAutoLearned given new LearnedType modelThe PR summary indicates a shift to a unified LearnedType. This file still toggles ElementInfo.IsAutoLearned. Please confirm that:
- IsAutoLearned is still authoritative, or
- These sites should instead initialize the new LearnedType on the relevant entity (ElementLocator/ElementInfo) to “AI”.
If the latter, update these assignments accordingly to keep UI/logic consistent with PomElementsPage and ElementLocator changes.
Also applies to: 244-246
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs (2)
79-80: CDP v139 aliasing looks good.The versioned DevTools aliases are correct and consistent with the rest of the changes.
11868-11877: Hardened DevTools teardown looks correct.Null-guards on
devToolsDomainsand safe disposal of the session prevent cleanup-time NREs.
Thank you for your contribution.
Before submitting this PR, please make sure:
Summary by CodeRabbit
New Features
Style
Chores