diff --git a/Ginger/Ginger/Agents/AgentEditPage.xaml.cs b/Ginger/Ginger/Agents/AgentEditPage.xaml.cs
index 9f1f54ae80..cd56d380d9 100644
--- a/Ginger/Ginger/Agents/AgentEditPage.xaml.cs
+++ b/Ginger/Ginger/Agents/AgentEditPage.xaml.cs
@@ -110,16 +110,7 @@ public AgentEditPage(Agent agent, bool isReadOnly = false, bool ignoreValidation
}
if (mAgent.AgentType == eAgentType.Driver)
{
- if (mAgent.DriverType == eDriverType.Selenium)
- {
- xAgentConfigFrame.SetContent(new WebAgentConfigEditPage(mAgent));
- }
- else
- {
- xAgentConfigFrame.SetContent(new AgentDriverConfigPage(mAgent, _viewMode));
- }
-
-
+ xAgentConfigFrame.SetContent(new AgentDriverConfigPage(mAgent, _viewMode));
}
else
{
diff --git a/Ginger/Ginger/Drivers/DriversConfigsEditPages/WebAgentConfigEditPage.xaml b/Ginger/Ginger/Drivers/DriversConfigsEditPages/WebAgentConfigEditPage.xaml
index 026263833c..cdc5364cc3 100644
--- a/Ginger/Ginger/Drivers/DriversConfigsEditPages/WebAgentConfigEditPage.xaml
+++ b/Ginger/Ginger/Drivers/DriversConfigsEditPages/WebAgentConfigEditPage.xaml
@@ -11,9 +11,7 @@
-
-
-
+
@@ -108,8 +106,22 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -134,29 +146,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -231,8 +221,21 @@
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -274,19 +277,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -300,8 +291,6 @@
-
-
-
+
diff --git a/Ginger/Ginger/Drivers/DriversConfigsEditPages/WebAgentConfigEditPage.xaml.cs b/Ginger/Ginger/Drivers/DriversConfigsEditPages/WebAgentConfigEditPage.xaml.cs
index 53cdb2ce98..eb1493b27e 100644
--- a/Ginger/Ginger/Drivers/DriversConfigsEditPages/WebAgentConfigEditPage.xaml.cs
+++ b/Ginger/Ginger/Drivers/DriversConfigsEditPages/WebAgentConfigEditPage.xaml.cs
@@ -56,7 +56,7 @@ public WebAgentConfigEditPage(Agent mAgent)
this.mAgent = mAgent;
InitializeComponent();
- bindElement();
+ BindElement();
DriverConfigParam? browserTypeParam = mAgent.DriverConfiguration.FirstOrDefault(p => string.Equals(p.Parameter, nameof(GingerWebDriver.BrowserType)));
if (browserTypeParam != null)
@@ -64,17 +64,17 @@ public WebAgentConfigEditPage(Agent mAgent)
browserTypeParam.PropertyChanged += BrowserTypeParam_PropertyChanged;
}
WebBrowserType browserType = Enum.Parse(browserTypeParam?.Value);
- edgeIEPnlVisibility(browserType);
- chromePnlvisibilitly(browserType);
- chromeFirefoxPnlVisibility(browserType);
- allBrowserNotBravePnl(browserType);
- proxyPnlVisbility();
+ EdgeIEPnlVisibility(browserType);
+ ChromePnlvisibilitly(browserType);
+ ChromeFirefoxPnlVisibility(browserType);
+ AllBrowserNotBravePnl(browserType);
+ ProxyPnlVisbility();
}
///
/// Binds the elements of the page.
///
- void bindElement()
+ void BindElement()
{
#region ProxyConfigration
@@ -246,7 +246,7 @@ void bindElement()
BindingHandler.ObjFieldBinding(xStartBMPPortVE, TextBox.ToolTipProperty, startBMPPort, nameof(DriverConfigParam.Description));
//Unhandled promt Behavior
- GingerCore.General.FillComboFromEnumType(xUnhandledPromptBehaviorComboBox, typeof(SeleniumDriver.eUnhandledPromptBehavior));
+ GingerCore.General.FillComboFromEnumObj(xUnhandledPromptBehaviorComboBox, new SeleniumDriver().UnhandledPromptBehavior1);
DriverConfigParam UnhandledPromptBehavior = mAgent.GetOrCreateParam(nameof(SeleniumDriver.UnhandledPromptBehavior));
BindingHandler.ObjFieldBinding(xUnhandledPromptBehaviorComboBox, ComboBox.SelectedValueProperty, UnhandledPromptBehavior, nameof(DriverConfigParam.Value));
BindingHandler.ObjFieldBinding(xUnhandledPromptBehaviorComboBox, ComboBox.ToolTipProperty, UnhandledPromptBehavior, nameof(DriverConfigParam.Description));
@@ -288,8 +288,7 @@ void bindElement()
if (!string.IsNullOrEmpty(proxyName.Value))
{
- autoDetect.Value = "False";
- BindingHandler.ObjFieldBinding(xAutoDetectProxyCB, CheckBox.IsCheckedProperty, autoDetect, nameof(DriverConfigParam.Value));
+ xAutoDetectProxyCB.IsChecked= false;
}
}
@@ -316,17 +315,17 @@ private void BrowserTypeParam_PropertyChanged(object? sender, PropertyChangedEve
}
WebBrowserType browserType = Enum.Parse(driverConfigParam.Value);
- edgeIEPnlVisibility(browserType);
- chromePnlvisibilitly(browserType);
- chromeFirefoxPnlVisibility(browserType);
- allBrowserNotBravePnl(browserType);
+ EdgeIEPnlVisibility(browserType);
+ ChromePnlvisibilitly(browserType);
+ ChromeFirefoxPnlVisibility(browserType);
+ AllBrowserNotBravePnl(browserType);
}
///
/// Sets the visibility of the Edge/IE panel based on the specified browser type.
///
/// The browser type.
- void allBrowserNotBravePnl(WebBrowserType result)
+ void AllBrowserNotBravePnl(WebBrowserType result)
{
@@ -346,7 +345,7 @@ void allBrowserNotBravePnl(WebBrowserType result)
/// Sets the visibility of the Edge/IE panel based on the specified browser type.
///
/// The browser type.
- void edgeIEPnlVisibility(WebBrowserType result)
+ void EdgeIEPnlVisibility(WebBrowserType result)
{
@@ -365,7 +364,7 @@ void edgeIEPnlVisibility(WebBrowserType result)
/// Sets the visibility of the Chrome panel based on the specified browser type.
///
/// The browser type.
- void chromePnlvisibilitly(WebBrowserType result)
+ void ChromePnlvisibilitly(WebBrowserType result)
{
if (result == WebBrowserType.Chrome|| result==WebBrowserType.Brave)
{
@@ -382,7 +381,7 @@ void chromePnlvisibilitly(WebBrowserType result)
/// Sets the visibility of the Chrome/Firefox panel based on the specified browser type.
///
/// The browser type.
- void chromeFirefoxPnlVisibility(WebBrowserType result)
+ void ChromeFirefoxPnlVisibility(WebBrowserType result)
{
if (result == WebBrowserType.Chrome || result == WebBrowserType.FireFox || result == WebBrowserType.Brave)
{
@@ -398,7 +397,7 @@ void chromeFirefoxPnlVisibility(WebBrowserType result)
///
/// The browser type.
- void proxyPnlVisbility()
+ void ProxyPnlVisbility()
{
if (xAutoDetectProxyCB.IsChecked == false)
{
@@ -412,7 +411,7 @@ void proxyPnlVisbility()
}
private void xAutoDetectProxyCB_Click(object sender, RoutedEventArgs e)
{
- proxyPnlVisbility();
+ ProxyPnlVisbility();
xProxyVE.ValueTextBox.Text = "";
}
}
diff --git a/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs b/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
index 53393d363b..949ef52cc4 100644
--- a/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
+++ b/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs
@@ -127,18 +127,36 @@ public enum ePageLoadStrategy
Normal,
Eager ,
None,
- }
-
+ }
public enum eUnhandledPromptBehavior
{
- Default,
- Ignore,
- Accept,
- Dismiss,
- AcceptAndNotify,
+ [EnumValueDescription("Default")]
+ Default,
+ [EnumValueDescription("Ignore")]
+ Ignore,
+ [EnumValueDescription("Accept")]
+ Accept,
+ [EnumValueDescription("Dismiss")]
+ Dismiss,
+ [EnumValueDescription("Accept And Notify")]
+ AcceptAndNotify,
+ [EnumValueDescription("Dismiss And Notify")]
DismissAndNotify
}
+ eUnhandledPromptBehavior mUnhandledPromptBehavior;
+ public eUnhandledPromptBehavior UnhandledPromptBehavior1
+ {
+ get { return mUnhandledPromptBehavior; }
+ set
+ {
+ if (mUnhandledPromptBehavior != value)
+ {
+ mUnhandledPromptBehavior = value;
+
+ }
+ }
+ }
public enum eBrowserLogLevel
{
@@ -167,6 +185,10 @@ public override string GetDriverConfigsEditPageName(Agent.eDriverType driverSubT
{
return "SeleniumRemoteWebDriverEditPage";
}
+ else if (browserType == WebBrowserType.Chrome|| browserType == WebBrowserType.Brave || browserType == WebBrowserType.Edge || browserType == WebBrowserType.InternetExplorer || browserType == WebBrowserType.FireFox )
+ {
+ return "WebAgentConfigEditPage";
+ }
else
{
return null;
@@ -268,7 +290,7 @@ public override string GetDriverConfigsEditPageName(Agent.eDriverType driverSubT
[UserConfigured]
[UserConfiguredDefault("")]
- [UserConfiguredDescription("Only for Chrome, Firefox & Edge | Full path for the User Profile folder")]
+ [UserConfiguredDescription("Only for Chrome, Firefox, Edge and Brave | Full path for the User Profile folder")]
public string UserProfileFolderPath { get; set; }
[UserConfigured]