Is it possible to configure Ranorex to use the same user code to identify buttons in an application (instead of renaming them for each test) and also to have a set of user defined code for any new tests. I.e. a common user code base for all tests?
Yes it is possible and very handy. What you do is have a code module library that inherits from ITestModule
, e.g.
public class GenericActionsLibrary : ITestModule
and then in the user code section of the recording module have the class inherit from your library.
public class TestLoginScreen : GenericActionsLibrary
In the recording module, each time you add a user code action, the drop-down list is filled with methods from both the user code module and the GenericActionsLibrary
.
Your GenericActionsLibrary
will need its own static reference to the repository.