Page 1 of 1

How to get the value of module name.

Posted: Thu Jan 31, 2019 7:14 am
by niennte777
Hi

Sorry,I"m not good at English.
Based on the module executed just before,
I would like to separate processing with "TEARDOWN".

+++++++++++++++++
Example

ModuleA Error

Variaale X = ModuleA

[TEARDOWN ] user code
If X = ModuleA
Action A
Else If X= ModuleB
Action B
Else
Action C
End If
+++++++++++++++++

Could you tell with reference to "Example"?

Re: How to get the value of module name.

Posted: Mon Feb 04, 2019 9:18 am
by odklizec
Hi,

You can use this code, to get the module name:

Code: Select all

using Ranorex.Core.Reporting;
...
var curModuleName = TestReport.CurrentTestModuleActivity.TestModuleName;