Some additional thoughts:
1.
Please check the ApartmentState of the NUnit thread, it must be STA (Single Threaded Apartement). Usually, NUnit runs the testing thread with an MTA apartment state while Ranorex assumes STA (and requires STA).
An instruction on how to do that can be found here:
http://www.hedgate.net/articles/2007/01 ... unit-test/
The first option is to place a config file in the same directory as you NUnit test library DLL. The second option is to create a new thread with STA in every test method calling Ranorex.
2.
Is it possible to run the most important part of the test without NUnit (from the command line).
I would like to check whether the problem exists only within NUnit or not.
Jenö
Ranorex Team