diff --git a/src/AxaFrance.WebEngine.Doc/docfx.json b/src/AxaFrance.WebEngine.Doc/docfx.json
index 23d4f42..c32ed9c 100644
--- a/src/AxaFrance.WebEngine.Doc/docfx.json
+++ b/src/AxaFrance.WebEngine.Doc/docfx.json
@@ -40,8 +40,8 @@
],
"build": {
"globalMetadata": {
- "_appTitle": "AXA WebEngine Test Framework",
- "_appFooter": "Copyright ® 2016-2024 AXA France, All rights reserved.",
+ "_appTitle": "AXA - WebEngine Test Framework",
+ "_appFooter": "Copyright ® 2016-2025 AXA France, All rights reserved.",
"_appLogoPath": "images/logo.svg"
},
"content": [
diff --git a/src/AxaFrance.WebEngine/SharedActionBase.cs b/src/AxaFrance.WebEngine/SharedActionBase.cs
index 8557fdb..66bbfe1 100644
--- a/src/AxaFrance.WebEngine/SharedActionBase.cs
+++ b/src/AxaFrance.WebEngine/SharedActionBase.cs
@@ -66,8 +66,26 @@ public abstract class SharedActionBase
///
protected ActionReport ActionReport { get; set; }
+ ///
+ /// Test case of which the sharedaction belongs to.
+ ///
protected TestCase testCase;
+
+ ///
+ /// Static function to run this shared action. the action:
+ /// 1. Check if all the required parameters are given, or by default using it's default value.
+ /// 2. for all those who the parameter has no default value (Parameter.Value == null), throw exception
+ /// 3. Create an instance of the action and run it.
+ ///
+ /// the object type of sharedAction
+ /// Test case of which the sharedaction belongs to.
+ /// The browser object
+ /// The stored context content to be shared and be used with other actions.
+ /// The testaction report to use for generating
+ /// Test parameters
+ /// A SharedActionBase object which is created during the execution. this object can be used later to call DoCheckpoint()
+
public static SharedActionBase DoAction(Type sharedActionType, TestCase relatedTestCase, object Context, List ContextValues, ActionReport actionReport, params Variable[] parameters)
{
Indent += 2;
@@ -166,26 +184,9 @@ public static SharedActionBase DoAction(Type sharedActionType, TestCase relatedT
return obj;
}
- ///
- /// Static function to run this shared action. the action:
- /// 1. Check if all the required parameters are given, or by default using it's default value.
- /// 2. for all those who the parameter has no default value (Parameter.Value == null), throw exception
- /// 3. Create an instance of the action and run it.
- ///
- /// the object type of sharedAction
- /// The browser object
- /// The stored context content to be shared and be used with other actions.
- /// The testaction report to use for generating
- /// Test parameters
- /// A SharedActionBase object which is created during the execution. this object can be used later to call DoCheckpoint()
- public static SharedActionBase DoAction(Type sharedActionType, object Context, List ContextValues, ActionReport actionReport, params Variable[] parameters)
- {
- return DoAction(sharedActionType, null, Context, ContextValues, actionReport, parameters);
- }
-
///
/// Funaction to run an sub action from the current one.
- /// This action reuses the and generates
+ /// This action reuses the and generates
/// a attached to
///
/// the object type of sharedAction
@@ -197,7 +198,7 @@ protected SharedActionBase DoAction(Type sharedActionType, object Context, List<
{
ActionReport ar = new ActionReport();
ActionReport.SubActionReports.Add(ar);
- var action = DoAction(sharedActionType, Context, ContextValues, ar, parameters);
+ var action = SharedActionBase.DoAction(sharedActionType, this.testCase, Context, ContextValues, ar, parameters);
return action;
}
@@ -206,6 +207,7 @@ protected SharedActionBase DoAction(Type sharedActionType, object Context, List<
/// This action calls internally DoAction() and DoCheckpoint() together. it is recommended to call this function within an action.
///
/// the Type of the SharedAction to run
+ /// TestCase which this action belongs to.
/// The Browser object
/// The stored context content to be shared and be used with other actions
/// The report object of the target action to be used.
@@ -214,15 +216,15 @@ protected SharedActionBase DoAction(Type sharedActionType, object Context, List<
///
/// When calling DoAction, DoCheckpoint or DoActionWithCheckpoint in another action, please consider promote the result to above level.
///
- public static bool DoActionWithCheckpoint(Type sharedActionType, object Context, List ContextValues, ActionReport actionReport, params Variable[] parameters)
+ public static bool DoActionWithCheckpoint(Type sharedActionType, TestCase testCase, object Context, List ContextValues, ActionReport actionReport, params Variable[] parameters)
{
bool returnvalue = true;
- SharedActionBase action = DoAction(sharedActionType, Context, ContextValues, actionReport, parameters);
+ SharedActionBase action = DoAction(sharedActionType, testCase, Context, ContextValues, actionReport, parameters);
if (action.ActionResult == Result.CriticalError) returnvalue = false;
else returnvalue = action.DoCheckpoint(Context);
if (!returnvalue)
{
- action.Screenshot("Auto screenshot for failure");
+ action.Screenshot("Auto screenshot because DoCheckpoint returns failure");
}
actionReport.ContextValues = action.ContextValues.ToList();
actionReport.EndTime = DateTime.Now;
@@ -246,9 +248,10 @@ public static bool DoActionWithCheckpoint(Type sharedActionType, object Context,
///
public static bool DoActionWithCheckpoint(Type sharedActionType, object Context, List ContextValues, SharedActionBase CallingAction, params Variable[] parameters)
{
- ActionReport action = new ActionReport();
- CallingAction.ActionReport.SubActionReports.Add(action);
- return DoActionWithCheckpoint(sharedActionType, Context, ContextValues, action, parameters);
+ var tc = CallingAction.testCase;
+ ActionReport actionReport = new ActionReport();
+ CallingAction.ActionReport.SubActionReports.Add(actionReport);
+ return DoActionWithCheckpoint(sharedActionType, tc, Context, ContextValues, actionReport, parameters);
}
///
diff --git a/src/Samples.Gherkin/Samples.Gherkin.csproj b/src/Samples.Gherkin/Samples.Gherkin.csproj
index 40394ac..5ec3aa5 100644
--- a/src/Samples.Gherkin/Samples.Gherkin.csproj
+++ b/src/Samples.Gherkin/Samples.Gherkin.csproj
@@ -13,7 +13,7 @@
-
+