How do I use the WaitForValidLicense method?

Class library usage, coding and language questions.
cxkf
Posts: 12
Joined: Thu Apr 04, 2013 12:53 pm

How do I use the WaitForValidLicense method?

Post by cxkf » Thu Apr 04, 2013 1:33 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How do I use the WaitForValidLicense method?

Post by Support Team » Fri Apr 05, 2013 4:38 pm

Hello,

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

Regards,
Markus (T)
.
Image

cxkf
Posts: 12
Joined: Thu Apr 04, 2013 12:53 pm

Re: How do I use the WaitForValidLicense method?

Post by cxkf » Fri Apr 05, 2013 6:22 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How do I use the WaitForValidLicense method?

Post by Support Team » Sat Apr 06, 2013 4:32 pm

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
.
Image