How do I start using ranorex in the first place?

Class library usage, coding and language questions.
taralex
Posts: 57
Joined: Tue Nov 04, 2008 3:50 pm
Location: Michigan
Contact:

How do I start using ranorex in the first place?

Post by taralex » Tue Nov 04, 2008 3:59 pm

Hi guys, I didn't find the "dummies" section, so I'll ask here.

I'm starting to create automated tests and was using AutoIt for this purpose, this is a nice and simple script, but it cannot access control elements. So I found out about ranorex. I feel it can help me solve my tasks, I'm even eager to learn C# for this purpose.

But I came against a brick wall from the very start: all the sample scripts I found in help simply don't work. Things like the following simply can't run because there's no Application or Form class in my Ranorex.Core or Ranorex namespaces...
What do I do wrong?

Code: Select all

Application.Start("calc.exe");
form = Application. FindFormClassName ("SciCalc",1, true ,5000);
Control button1= form.FindChildText

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Tue Nov 04, 2008 4:44 pm

Add RanorexNet.dll to the 'References' folder within the projects 'Solution Explorer'.

Please read the following page from the Ranorex User Guide:

http://www.ranorex.com/gui-testing-guid ... dio-1.html

Which Ranorex Version do you use, V1.5 or V2.0?
Are you working with Ranorex Studio or MS Visual Studio?

Please see also the projects in the samples directory.

Jenö
Ranorex Team

taralex
Posts: 57
Joined: Tue Nov 04, 2008 3:50 pm
Location: Michigan
Contact:

Post by taralex » Tue Nov 04, 2008 5:01 pm

Which Ranorex Version do you use, V1.5 or V2.0?
Are you working with Ranorex Studio or MS Visual Studio?
I actually have downloaded both, and try to use them from MS Visual C#. The problem is, I'm totally new to C# and ranorex, so I'm learning along the way. I used to automate my tests with AutoIt, but ran into so many brick walls that I decided to give C# a try, and Ranorex seems to have a library that would satisfy all my needs, I just have to learn how to use it. I tried to analyze what Recorder is generating, but there's so much code for just a couple of mouse clicks, that I failed.

Thank you for a quick reply!

taralex
Posts: 57
Joined: Tue Nov 04, 2008 3:50 pm
Location: Michigan
Contact:

Post by taralex » Tue Nov 04, 2008 5:34 pm

Just tried to import the dlls. I'm totally confused...
If I import RanorexNet.dll from Ranorex 1.5, it works ok, but I'm not able to import RanorexCore.dll, it sais I have insufficient user priviledges, which is strange because I'm the admin on my PC.

I can use Ranorex.Core.dll belonging to Ranorex 2.0 though, but 2.0 has no RanorexNet.dll in it...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Tue Nov 04, 2008 5:51 pm

I would suggest to use the version V1.5.
...but I'm not able to import RanorexCore.dll
You do not need to import the RanorexCore.dll, just copy the DLL RanorexCore.dll from C:\Program Files\Ranorex 1.5\Bin\Net2.0-Pro to your Windows\System32 directory and run your test cases again.

Jenö
Ranorex Team

taralex
Posts: 57
Joined: Tue Nov 04, 2008 3:50 pm
Location: Michigan
Contact:

Post by taralex » Tue Nov 04, 2008 5:56 pm

I did as you've said, but I'm getting the following message when I try to call a function from this dll:

"The current user has insufficient access priviledges. Please run Ranorex with admin priviledges."

This really makes no sense, because I do have admin priviledges.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Tue Nov 04, 2008 6:40 pm

Do you get the same error if you open, build and start the sample project "RanorexVS2005Sample1.csproj" with visual studio?

Jenö
Ranorex Team

taralex
Posts: 57
Joined: Tue Nov 04, 2008 3:50 pm
Location: Michigan
Contact:

Post by taralex » Tue Nov 04, 2008 6:45 pm

yes

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Wed Nov 05, 2008 6:52 pm

Hmm... i could not found any known issues similar like that.
With admin rights you should not get this message, this must be a security issue.
I can only suggest to install the V1.5 again and try once more, or please try to install V1.5 on another machine.

Jenö
Ranorex Team

taralex
Posts: 57
Joined: Tue Nov 04, 2008 3:50 pm
Location: Michigan
Contact:

Post by taralex » Wed Nov 05, 2008 8:33 pm

Very strange... On a different machine Ranorex runs ok, just displays the "30 day trial" dialog box. On my laptop it shows the "The current user has insufficient access priviledges. Please run Ranorex with admin priviledges." dialog box. And I am the administrator on it.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Thu Nov 06, 2008 11:15 am

This is indeed strange. Did you try to reinstall Ranorex on your laptop?

Regards,
Alex
Ranorex Support Team

taralex
Posts: 57
Joined: Tue Nov 04, 2008 3:50 pm
Location: Michigan
Contact:

Post by taralex » Thu Nov 06, 2008 4:20 pm

I did reinstall ranorex.
Now another idea occured to me: can I copy RanorexNet.dll and RanorexCore.dll somewhere else, then uninstall ranorex, and use only the dll in my Visual Studio?

taralex
Posts: 57
Joined: Tue Nov 04, 2008 3:50 pm
Location: Michigan
Contact:

Post by taralex » Thu Nov 06, 2008 5:17 pm

Just tried it... got the same message about access rights. I guess I won't be able to use ranorex library on my laptop...