Skip to content

Commit 0b49dc3

Browse files
Merge pull request #4369 from Ginger-Automation/Releases/Beta-Published/Beta-2025.5.1
Releases/beta published/beta 2025.5.1
2 parents a892a8b + e24d4aa commit 0b49dc3

88 files changed

Lines changed: 660 additions & 15640 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/Build.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ jobs:
6767
echo $save > .\Ginger\GingerCoreCommon/GingerCoreCommon.csproj
6868
$save=(Get-Content .\Ginger\GingerInstallerScript.iss) -replace '#define MyAppVersion "*.*.*.*"','#define MyAppVersion "${{ env.gingernumber}}"'
6969
echo $save > .\Ginger\GingerInstallerScript.iss
70-
$save=(Get-Content .\Ginger\GingerCore\Drivers\JavaDriverLib\GingerJavaAgent\agent\com\amdocs\ginger\GingerAgent.java) -replace 'public static final String GINGER_JAVA_AGENT_VERSION="*.*.*.*";','public static final String GINGER_JAVA_AGENT_VERSION="${{ env.gingernumber}}";'
71-
echo $save > .\Ginger\GingerCore\Drivers\JavaDriverLib\GingerJavaAgent\agent\com\amdocs\ginger\GingerAgent.java
7270
$save=(Get-Content .\Ginger\GingerInstallerScriptGithub.iss) -replace '#define MyAppVersion "*.*.*.*"','#define MyAppVersion "${{ env.gingernumber}}"'
7371
echo $save > .\Ginger\GingerInstallerScriptGithub.iss
7472
@@ -77,17 +75,15 @@ jobs:
7775
run: |
7876
sed -i 's/<AssemblyVersion>.*<\/AssemblyVersion>/<AssemblyVersion>${{ env.gingernumber}}<\/AssemblyVersion>/' ./Ginger/GingerCoreCommon/GingerCoreCommon.csproj
7977
sed -i 's/<FileVersion>.*<\/FileVersion>/<FileVersion>${{ env.gingernumber}}<\/FileVersion>/' ./Ginger/GingerCoreCommon/GingerCoreCommon.csproj
80-
sed -i 's/#define MyAppVersion ".*"/#define MyAppVersion "${{ env.gingernumber}}"/' ./Ginger/GingerInstallerScript.iss
81-
sed -i 's/public static final String GINGER_JAVA_AGENT_VERSION=".*";/public static final String GINGER_JAVA_AGENT_VERSION="${{ env.gingernumber}}";/' ./Ginger/GingerCore/Drivers/JavaDriverLib/GingerJavaAgent/agent/com/amdocs/ginger/GingerAgent.java
78+
sed -i 's/#define MyAppVersion ".*"/#define MyAppVersion "${{ env.gingernumber}}"/' ./Ginger/GingerInstallerScript.iss
8279
sed -i 's/#define MyAppVersion ".*"/#define MyAppVersion "${{ env.gingernumber}}"/' ./Ginger/GingerInstallerScriptGithub.iss
8380
8481
- name: 'Update Assembly - macOS'
8582
if: ${{github.workflow == 'CD' && runner.os == 'macOS'}}
8683
run: |
8784
sed -i '' 's/<AssemblyVersion>.*<\/AssemblyVersion>/<AssemblyVersion>${{ env.gingernumber}}<\/AssemblyVersion>/' ./Ginger/GingerCoreCommon/GingerCoreCommon.csproj
8885
sed -i '' 's/<FileVersion>.*<\/FileVersion>/<FileVersion>${{ env.gingernumber}}<\/FileVersion>/' ./Ginger/GingerCoreCommon/GingerCoreCommon.csproj
89-
sed -i '' 's/#define MyAppVersion ".*"/#define MyAppVersion "${{ env.gingernumber}}"/' ./Ginger/GingerInstallerScript.iss
90-
sed -i '' 's/public static final String GINGER_JAVA_AGENT_VERSION=".*";/public static final String GINGER_JAVA_AGENT_VERSION="${{ env.gingernumber}}";/' ./Ginger/GingerCore/Drivers/JavaDriverLib/GingerJavaAgent/agent/com/amdocs/ginger/GingerAgent.java
86+
sed -i '' 's/#define MyAppVersion ".*"/#define MyAppVersion "${{ env.gingernumber}}"/' ./Ginger/GingerInstallerScript.iss
9187
sed -i '' 's/#define MyAppVersion ".*"/#define MyAppVersion "${{ env.gingernumber}}"/' ./Ginger/GingerInstallerScriptGithub.iss
9288
9389
- name: 'Print OS type'

Extensions/DotnetDependencies/aspnetcore-runtime-8.0.0-win-x64.exe renamed to Extensions/DotnetDependencies/aspnetcore-runtime-8.0.22-win-x64.exe

9.88 MB
Binary file not shown.

Extensions/DotnetDependencies/windowsdesktop-runtime-8.0.0-win-x64.exe renamed to Extensions/DotnetDependencies/windowsdesktop-runtime-8.0.22-win-x64.exe

55.5 MB
Binary file not shown.

Ginger/Ginger.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.1.32319.34
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.0.11205.157
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GingerCoreCommon", "GingerCoreCommon\GingerCoreCommon.csproj", "{9D569B65-EC6C-4677-A59B-CF12C24B5EB0}"
77
EndProject

Ginger/Ginger/Actions/ActionEditPages/ActConsoleCommandEditPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<Grid Background="{StaticResource $BackgroundColor_White}">
1212
<StackPanel>
1313
<Label Style="{StaticResource @InputFieldLabelStyle}">Console Action Type:</Label>
14-
<ComboBox x:Name="ConsoleActionComboBox" SelectionChanged="ConsoleActionComboBox_SelectionChanged" Style="{StaticResource $FlatInputComboBoxStyle}"></ComboBox>
14+
<ComboBox x:Name="ConsoleActionComboBox" SelectionChanged="ConsoleActionComboBox_SelectionChanged" Style="{StaticResource $FlatInputComboBoxStyle}" ></ComboBox>
1515

1616
<StackPanel x:Name="ScriptStackPanel">
1717
<Label Style="{StaticResource @InputFieldLabelStyle}">Script Name (located in Solution~\Documents\sh\):</Label>

Ginger/Ginger/Actions/ActionEditPages/ActConsoleCommandEditPage.xaml.cs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public ActConsoleCommandEditPage(ActConsoleCommand actConsoleCommand)
5555
List<object> list = GetActionListPlatform();
5656

5757
GingerCore.General.FillComboFromEnumObj(ConsoleActionComboBox, actConsoleCommand.ConsoleCommand, list);
58-
GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ConsoleActionComboBox, ComboBox.TextProperty, actConsoleCommand, ActConsoleCommand.Fields.ConsoleCommand);
58+
GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ConsoleActionComboBox, ComboBox.SelectedValueProperty, actConsoleCommand, ActConsoleCommand.Fields.ConsoleCommand);
5959
GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(CommandTextBox, TextBox.TextProperty, actConsoleCommand, ActConsoleCommand.Fields.Command);
6060
GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ScriptNameComboBox, ComboBox.TextProperty, actConsoleCommand, ActConsoleCommand.Fields.ScriptName);
6161
GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(txtWait, TextBox.TextProperty, actConsoleCommand, ActConsoleCommand.Fields.WaitTime);
@@ -67,7 +67,7 @@ public ActConsoleCommandEditPage(ActConsoleCommand actConsoleCommand)
6767
// Apply initial visibility according to current selected command
6868
if (ConsoleActionComboBox.SelectedItem != null)
6969
{
70-
UpdateVisibilityForCommand((ActConsoleCommand.eConsoleCommand)Enum.Parse(typeof(ActConsoleCommand.eConsoleCommand), ConsoleActionComboBox.SelectedItem.ToString()));
70+
UpdateVisibilityForCommand((ActConsoleCommand.eConsoleCommand)Enum.Parse(typeof(ActConsoleCommand.eConsoleCommand), ConsoleActionComboBox.SelectedValue?.ToString()));
7171
}
7272
}
7373

@@ -94,14 +94,17 @@ private List<object> GetActionListPlatform()
9494
{
9595
actionList.Add(ActConsoleCommand.eConsoleCommand.ParametrizedCommand);
9696
actionList.Add(ActConsoleCommand.eConsoleCommand.Script);
97-
actionList.Add(ActConsoleCommand.eConsoleCommand.StartRecordingBuffer);
98-
actionList.Add(ActConsoleCommand.eConsoleCommand.StopRecordingBuffer);
99-
actionList.Add(ActConsoleCommand.eConsoleCommand.ReturnBufferContent);
97+
actionList.Add(ActConsoleCommand.eConsoleCommand.StartRecordingConsoleLogs);
98+
actionList.Add(ActConsoleCommand.eConsoleCommand.StopRecordingConsoleLogs);
99+
actionList.Add(ActConsoleCommand.eConsoleCommand.GetRecordedConsoleLogs);
100100
}
101101
else if (mActConsoleCommand.Platform == ePlatformType.DOS)
102102
{
103103
actionList.Add(ActConsoleCommand.eConsoleCommand.CopyFile);
104104
actionList.Add(ActConsoleCommand.eConsoleCommand.IsFileExist);
105+
actionList.Add(ActConsoleCommand.eConsoleCommand.StartRecordingConsoleLogs);
106+
actionList.Add(ActConsoleCommand.eConsoleCommand.StopRecordingConsoleLogs);
107+
actionList.Add(ActConsoleCommand.eConsoleCommand.GetRecordedConsoleLogs);
105108
}
106109
return actionList;
107110
}
@@ -115,7 +118,7 @@ private void ConsoleActionComboBox_SelectionChanged(object sender, SelectionChan
115118
ScriptStackPanel.Visibility = Visibility.Collapsed;
116119
CommandPanel.Visibility = Visibility.Collapsed;
117120

118-
ActConsoleCommand.eConsoleCommand comm = (ActConsoleCommand.eConsoleCommand)Enum.Parse(typeof(ActConsoleCommand.eConsoleCommand), ConsoleActionComboBox.SelectedItem.ToString());
121+
ActConsoleCommand.eConsoleCommand comm = (ActConsoleCommand.eConsoleCommand)ConsoleActionComboBox.SelectedValue;
119122

120123
switch (comm)
121124
{
@@ -124,8 +127,8 @@ private void ConsoleActionComboBox_SelectionChanged(object sender, SelectionChan
124127
mActConsoleCommand.AddInputValueParam("Free Command");
125128
mActConsoleCommand.ScriptName = string.Empty;
126129
break;
127-
case ActConsoleCommand.eConsoleCommand.StartRecordingBuffer:
128-
case ActConsoleCommand.eConsoleCommand.StopRecordingBuffer:
130+
case ActConsoleCommand.eConsoleCommand.StartRecordingConsoleLogs:
131+
case ActConsoleCommand.eConsoleCommand.StopRecordingConsoleLogs:
129132
// No params required for recording buffer start/stop
130133
mActConsoleCommand.InputValues.Clear();
131134
mActConsoleCommand.ScriptName = string.Empty;
@@ -145,7 +148,10 @@ private void ConsoleActionComboBox_SelectionChanged(object sender, SelectionChan
145148
break;
146149
}
147150

148-
UpdateVisibilityForCommand(comm);
151+
if (ConsoleActionComboBox.SelectedItem != null)
152+
{
153+
UpdateVisibilityForCommand(comm);
154+
}
149155
}
150156

151157
private void SetupValueInputParam()
@@ -158,7 +164,7 @@ private void SetupValueInputParam()
158164
private void UpdateVisibilityForCommand(ActConsoleCommand.eConsoleCommand command)
159165
{
160166
// Hide all optional controls when StartRecordingBuffer or StopRecordingBuffer selected
161-
bool showCommonControls = command != ActConsoleCommand.eConsoleCommand.StartRecordingBuffer && command != ActConsoleCommand.eConsoleCommand.StopRecordingBuffer;
167+
bool showCommonControls = command != ActConsoleCommand.eConsoleCommand.StartRecordingConsoleLogs && command != ActConsoleCommand.eConsoleCommand.StopRecordingConsoleLogs;
162168

163169
if (ExpectedStringLabel != null) { ExpectedStringLabel.Visibility = showCommonControls ? Visibility.Visible : Visibility.Collapsed; }
164170
if (txtExpected != null) { txtExpected.Visibility = showCommonControls ? Visibility.Visible : Visibility.Collapsed; }

Ginger/Ginger/Actions/ActionEditPages/ActDataSourcePage.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public ActDataSourcePage(ActDSTableElement Act = null)
103103
{
104104
SetDataSourceVEParams(VEOrg);
105105
}
106+
grdCondition.DataSourceList = mActDSTblElem.WhereConditions;
106107

107108
WeakEventManager<TextBoxBase, TextChangedEventArgs>.AddHandler(source: ValueUC.ValueTextBox, eventName: nameof(TextBoxBase.TextChanged), handler: ValueChanged);
108109
}

Ginger/Ginger/Actions/ActionEditPages/ActLaunchJavaWSApplicationEditPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private void DoBinding()
7676
rbGroupPortConfig.Init(typeof(ActLaunchJavaWSApplication.ePortConfigType), RadioButtonPanel, mAct.GetOrCreateInputParam(ActLaunchJavaWSApplication.Fields.PortConfigParam, ActLaunchJavaWSApplication.ePortConfigType.Manual.ToString()), new RoutedEventHandler(PortConfigRB_Click));
7777

7878
GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ApplicationProcessNameChkBox, CheckBox.IsCheckedProperty, mAct, ActLaunchJavaWSApplication.Fields.IsCustomApplicationProcessName);
79-
ApplicationProcessNameTextBox.Init(Context.GetAsContext(mAct.Context), mAct, ActLaunchJavaWSApplication.Fields.ApplicationProcessName);
79+
ApplicationProcessNameTextBox.Init(Context.GetAsContext(mAct.Context), mAct, ActLaunchJavaWSApplication.Fields.ApplicationProcessName);
8080

8181
UpdateAgentPortTextBoxEnabledStatus();
8282
}

Ginger/Ginger/DataSource/ImportExcelWizardLib/ImportDataSourceFromExcelWizard.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ public override void Finish()
9696
}
9797
foreach (DataTable dt in ExcelImportData.Tables)
9898
{
99+
if (!IsImportEmptyColumns)
100+
{
101+
// Removing empty rows
102+
RemoveEmptyRows(dt);
103+
}
104+
99105
string cols = GetColumnNameListForTableCreation(dt);
100106
AddDefaultColumn(dt);
101107
CreateTable(dt.TableName, cols);
@@ -108,6 +114,31 @@ public override void Finish()
108114
}
109115
}
110116

117+
private void RemoveEmptyRows(DataTable dt)
118+
{
119+
var rowsToRemove = new List<DataRow>();
120+
foreach (DataRow row in dt.Rows)
121+
{
122+
bool isEmpty = true;
123+
foreach (var item in row.ItemArray)
124+
{
125+
if (item != null && !string.IsNullOrWhiteSpace(item.ToString()))
126+
{
127+
isEmpty = false;
128+
break;
129+
}
130+
}
131+
if (isEmpty)
132+
{
133+
rowsToRemove.Add(row);
134+
}
135+
}
136+
foreach (var row in rowsToRemove)
137+
{
138+
dt.Rows.Remove(row);
139+
}
140+
}
141+
111142
/// <summary>
112143
/// This method is used to get the columnList for exporting the parameters to datasource
113144
/// </summary>

Ginger/Ginger/Drivers/DriversWindows/ConsoleDriverWindow.xaml.cs

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,30 @@ await this.Dispatcher.InvokeAsync(async () =>
159159
});
160160
break;
161161

162+
case DriverBase.eDriverMessageType.CloseDriverWindow:
163+
// Driver is closing - close window gracefully
164+
await Dispatcher.InvokeAsync(() =>
165+
{
166+
try
167+
{
168+
Reporter.ToLog(eLogLevel.DEBUG, "Closing console window per driver request");
169+
170+
// Unsubscribe from events to prevent recursive calls
171+
if (mConsoleDriver != null)
172+
{
173+
((DriverBase)mConsoleDriver).DriverMessageEvent -= ConsoleDriverWindow_DriverMessageEvent;
174+
}
175+
176+
// Close window
177+
this.Close();
178+
}
179+
catch (Exception ex)
180+
{
181+
Reporter.ToLog(eLogLevel.ERROR, "Error closing console window", ex);
182+
}
183+
});
184+
break;
185+
162186
case DriverBase.eDriverMessageType.ConsoleBufferUpdate:
163187
// After a command/action finished, we can auto-scroll or update UI if needed
164188
await Dispatcher.InvokeAsync(() =>
@@ -193,6 +217,38 @@ await Dispatcher.InvokeAsync(() =>
193217
}
194218
}
195219

220+
private void ConsoleDriverWindow_Closing(Object sender, System.ComponentModel.CancelEventArgs e)
221+
{
222+
// Prevent recursive calls
223+
if (mConsoleDriver == null)
224+
{
225+
return;
226+
}
227+
228+
mRecording = false;
229+
230+
try
231+
{
232+
// Unsubscribe from events first
233+
((DriverBase)mConsoleDriver).DriverMessageEvent -= ConsoleDriverWindow_DriverMessageEvent;
234+
235+
// Only disconnect if driver is still running
236+
if (mConsoleDriver.IsRunning())
237+
{
238+
Reporter.ToLog(eLogLevel.DEBUG, "User closed console window - disconnecting driver");
239+
mConsoleDriver.Disconnect();
240+
mConsoleDriver.CloseDriver();
241+
}
242+
243+
// Clear reference
244+
mConsoleDriver = null;
245+
}
246+
catch (Exception ex)
247+
{
248+
Reporter.ToLog(eLogLevel.ERROR, "Error during console window closing", ex);
249+
}
250+
}
251+
196252
private void GoButton_Click(object sender, RoutedEventArgs e)
197253
{
198254
mConsoleDriver.CleanExpectedString();
@@ -325,19 +381,6 @@ private void NewActionButton_Click(object sender, RoutedEventArgs e)
325381
CNAP.ShowAsWindow(this);
326382
}
327383

328-
private void ConsoleDriverWindow_Closing(Object sender, System.ComponentModel.CancelEventArgs e)
329-
{
330-
mRecording = false;
331-
try
332-
{
333-
mConsoleDriver.Disconnect();
334-
mConsoleDriver.CloseDriver();
335-
}
336-
catch (Exception ex)
337-
{
338-
Reporter.ToLog(eLogLevel.ERROR, "Error when try to close Console Driver - " + ex.Message);
339-
}
340-
}
341384
private void ApplyStyleToText(string result, ref Paragraph p)
342385
{
343386
try

0 commit comments

Comments
 (0)