Skip to content
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

Bug fix/40547_RemoteWebDriver Agent config page not showing #3835

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions Ginger/Ginger/Agents/AgentEditPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
<Grid x:Name="xPageGrid" Grid.IsSharedSizeScope="True" Background="{StaticResource $BackgroundColor_White}">


<TabControl >
<TabItem Header="Configurations" Style="{StaticResource $RoundedTab}">
<StackPanel Orientation="Vertical" Margin="5,5,0,0">
<StackPanel Orientation="Vertical" Margin="5,5,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
Expand Down Expand Up @@ -300,8 +298,6 @@



</StackPanel>
</TabItem>
</TabControl>
</StackPanel>
</Grid>
</Page>
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,25 @@ 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)
{
browserTypeParam.PropertyChanged += BrowserTypeParam_PropertyChanged;
}
WebBrowserType browserType = Enum.Parse<WebBrowserType>(browserTypeParam?.Value);
edgeIEPnlVisibility(browserType);
chromePnlvisibilitly(browserType);
chromeFirefoxPnlVisibility(browserType);
allBrowserNotBravePnl(browserType);
proxyPnlVisbility();
EdgeIEPnlVisibility(browserType);
ChromePnlvisibilitly(browserType);
ChromeFirefoxPnlVisibility(browserType);
AllBrowserNotBravePnl(browserType);
ProxyPnlVisbility();
}

/// <summary>
/// Binds the elements of the page.
/// </summary>
void bindElement()
void BindElement()
{

#region ProxyConfigration
Expand Down Expand Up @@ -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;
}
}

Expand All @@ -316,17 +315,17 @@ private void BrowserTypeParam_PropertyChanged(object? sender, PropertyChangedEve
}

WebBrowserType browserType = Enum.Parse<WebBrowserType>(driverConfigParam.Value);
edgeIEPnlVisibility(browserType);
chromePnlvisibilitly(browserType);
chromeFirefoxPnlVisibility(browserType);
allBrowserNotBravePnl(browserType);
EdgeIEPnlVisibility(browserType);
ChromePnlvisibilitly(browserType);
ChromeFirefoxPnlVisibility(browserType);
AllBrowserNotBravePnl(browserType);
}

/// <summary>
/// Sets the visibility of the Edge/IE panel based on the specified browser type.
/// </summary>
/// <param name="result">The browser type.</param>
void allBrowserNotBravePnl(WebBrowserType result)
void AllBrowserNotBravePnl(WebBrowserType result)
{


Expand All @@ -346,7 +345,7 @@ void allBrowserNotBravePnl(WebBrowserType result)
/// Sets the visibility of the Edge/IE panel based on the specified browser type.
/// </summary>
/// <param name="result">The browser type.</param>
void edgeIEPnlVisibility(WebBrowserType result)
void EdgeIEPnlVisibility(WebBrowserType result)
{


Expand All @@ -365,7 +364,7 @@ void edgeIEPnlVisibility(WebBrowserType result)
/// Sets the visibility of the Chrome panel based on the specified browser type.
/// </summary>
/// <param name="result">The browser type.</param>
void chromePnlvisibilitly(WebBrowserType result)
void ChromePnlvisibilitly(WebBrowserType result)
{
if (result == WebBrowserType.Chrome|| result==WebBrowserType.Brave)
{
Expand All @@ -382,7 +381,7 @@ void chromePnlvisibilitly(WebBrowserType result)
/// Sets the visibility of the Chrome/Firefox panel based on the specified browser type.
/// </summary>
/// <param name="result">The browser type.</param>
void chromeFirefoxPnlVisibility(WebBrowserType result)
void ChromeFirefoxPnlVisibility(WebBrowserType result)
{
if (result == WebBrowserType.Chrome || result == WebBrowserType.FireFox || result == WebBrowserType.Brave)
{
Expand All @@ -398,7 +397,7 @@ void chromeFirefoxPnlVisibility(WebBrowserType result)
/// </summary>
/// <param name="result">The browser type.</param>

void proxyPnlVisbility()
void ProxyPnlVisbility()
{
if (xAutoDetectProxyCB.IsChecked == false)
{
Expand All @@ -412,7 +411,7 @@ void proxyPnlVisbility()
}
private void xAutoDetectProxyCB_Click(object sender, RoutedEventArgs e)
{
proxyPnlVisbility();
ProxyPnlVisbility();
xProxyVE.ValueTextBox.Text = "";
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,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;
Expand Down
Loading