01-23-2016 07:25 PM
I want to create an .NET action step with C#, I know we can use code such as below to add an action step:
mainSequence.stepGroups[(int)StepGroupName.setup].steps.Add(new StepData("Action", StepTypes.StepType_Action , AdapterKeyNames.NETAdapterKeyName));
but to make action step works, we need to set the Assbemly, Root Class, Method Invocated properties, something like
mainSequence.stepGroups[(int)StepGroupName.main].steps.Last().stepProps.Add(new PropData("RootClass", "a.b.c"));
but i don't know the property path for them , cannot see it in property panel either, anymore can help me on this?
01-25-2016 10:18 AM
You need to create a new step using the .NET adapter with the Engine.NewStep API. Then add it to your sequence. Then do something like this to get the higher level API for specifying .NET modules:
DotNetModule myModule = (DotNetModule) myStep.Module;
Then set the assembly on the module using SetAssembly(), then set the ClassName, then specify the calls.
Hope this helps,
-Doug