Page 1 of 1

How do I use the WaitForValidLicense method?

Posted: Thu Apr 04, 2013 1:33 pm
by cxkf
I want to use the WaitForValidLicense method to solve the problem that is also addressed in Floating License: Wait for license.
But there seems to be a problem: In order to call this method, ranorex has to be running with a valid license. This makes the license check completely unnecessary.
Am I overseeing something?
Can you provide something to check for a valid license from outside of ranorex? A simple command line program would be great.

Re: How do I use the WaitForValidLicense method?

Posted: Fri Apr 05, 2013 4:38 pm
by Support Team
Hello,

You could use Ranorex.Licensing.exe to verify if a valid license is installed.

Regards,
Markus (T)

Re: How do I use the WaitForValidLicense method?

Posted: Fri Apr 05, 2013 6:22 pm
by cxkf
Can you give an example?
It is necessary that the license check can be done automatically before the ranorex test is startet to prevent failed tests because of an unavailable floating license.

Re: How do I use the WaitForValidLicense method?

Posted: Sat Apr 06, 2013 4:32 pm
by Support Team
cxkf wrote:In order to call this method, ranorex has to be running with a valid license. This makes the license check completely unnecessary.
I'm not sure what you mean. You can just call the ElementEngine.WaitForValidLicense method without already having a license. The method does not need a license.

Just call this method at the very start of your executable, i.e. as the first line in your "Program.cs" file "Main" method.

Regards,
Alex
Ranorex Team