Program works in Studio not via exe

Ranorex Studio, Spy, Recorder, and Driver.
SeanP
Posts: 60
Joined: Wed Sep 01, 2010 11:48 pm
Location: Irvine California

Program works in Studio not via exe

Post by SeanP » Wed Jan 05, 2011 6:53 pm

Hi,

I have developed a project that is doing some mouse movements and clicking. When I run the program in Studio via the run icon the program executes with out fail. When I just run the exe that was built via Windows Explorer, a get an error about a button could not be found. I have attached the error.

Please help.

Sean

Ranorex v2.3.6
You do not have the required permissions to view the files attached to this post.
Last edited by SeanP on Tue Jan 11, 2011 6:58 pm, edited 1 time in total.

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

Re: Program works in Studio not via exe

Post by Support Team » Fri Jan 07, 2011 12:30 pm

SeanP wrote:When I run the program in Studio via the run icon the program executes with out fail.
By "Run" icon you do not mean the Recorder "Play" button inside Ranorex Studio, but the "Run compiled exe" button in the main toolbar (see below screenshot), right?
RanorexStudio_Toolbar.PNG
If so, this is really a strange error. Because all the button does is compiling the executable and running it with the debugger attached. This should not differ from running the compiled executable except that the execution is a little bit slower when the debugger is attached. It might be a timing issue, so you can try to add a delay before the action that fails.

Could you also try to start the executable from within Ranorex Studio without attached debugger by clicking on the black play button right next to the green one?

Regards,
Alex
Ranorex Team
You do not have the required permissions to view the files attached to this post.

SeanP
Posts: 60
Joined: Wed Sep 01, 2010 11:48 pm
Location: Irvine California

Re: Program works in Studio not via exe

Post by SeanP » Fri Jan 07, 2011 6:44 pm

Yes I run the program via the green "Play" button. I will try using the black "Play" button and report back. This for sure does not work when I run the exe in the bin folder. Even after I do a "Rebuild Solution" and "Clean Solution" followed by a "Build Solution".

SeanP
Posts: 60
Joined: Wed Sep 01, 2010 11:48 pm
Location: Irvine California

Re: Program works in Studio not via exe

Post by SeanP » Fri Jan 07, 2011 7:42 pm

Well I have tried it using the black "Play" button and it still plays properly. The exe does not.

Note: I have also tried adding the delays and this does not help either. When I make a new project and redo my work for that part... everything is fine.


What to do next?

Sean

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Program works in Studio not via exe

Post by Ciege » Fri Jan 07, 2011 8:45 pm

Shot in the dark question...
Are both of these test (from RX Studio and from the .EXE) on the same machine or on different machines?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

SeanP
Posts: 60
Joined: Wed Sep 01, 2010 11:48 pm
Location: Irvine California

Re: Program works in Studio not via exe

Post by SeanP » Sat Jan 08, 2011 12:07 am

Both on the same machine. The test is for a MFC application.

Like I said, a re-record in a fresh project fixes this but I am not sure why it is not working in this scenario.

Sean

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

Re: Program works in Studio not via exe

Post by Support Team » Mon Jan 10, 2011 7:11 pm

A security issue could also be possible. Do you start Ranorex Studio as Administrator? The automating process must have at least the same security rights as the automated application.

My last and rather wild guess is that the Windows Explorer form interferes with your automation, i.e. a RanoreXPath only works if Windows Explorer is not visible/opened.
SeanP wrote:Like I said, a re-record in a fresh project fixes this but I am not sure why it is not working in this scenario.
Could you identify any differences between the old project and the newly created one, with which the automation from Windows Explorer finally works?

Regards,
Alex
Ranorex Team

SeanP
Posts: 60
Joined: Wed Sep 01, 2010 11:48 pm
Location: Irvine California

Re: Program works in Studio not via exe

Post by SeanP » Tue Jan 11, 2011 6:03 pm

Support Team wrote:A security issue could also be possible. Do you start Ranorex Studio as Administrator? The automating process must have at least the same security rights as the automated application.

My last and rather wild guess is that the Windows Explorer form interferes with your automation, i.e. a RanoreXPath only works if Windows Explorer is not visible/opened.
SeanP wrote:Like I said, a re-record in a fresh project fixes this but I am not sure why it is not working in this scenario.
Could you identify any differences between the old project and the newly created one, with which the automation from Windows Explorer finally works?

Regards,
Alex
Ranorex Team

Well I found something interesting out. We tried running it on an older version, 2.3.4.9270, and the exe runs without any issues. The project built in 2.3.7.

There were no differences between the environment of the two projects and how they were created.

I have attached a file to show where the control fails to register. It is basically the pull down box that is selected.
You do not have the required permissions to view the files attached to this post.

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

Re: Program works in Studio not via exe

Post by Support Team » Wed Jan 12, 2011 7:15 pm

Hi,

We tried again to reproduce this issue, but Ranorex is working as expected. It makes no difference if you start the exe by clicking the play button of studio or if you start the exe via Windows Explorer. Would it be possible to provide us your application and your project to reproduce the problem? Maybe it is some special case where you need the exact same parameters.

Thanks in advance.

Regards,
Peter
Ranorex Team

SeanP
Posts: 60
Joined: Wed Sep 01, 2010 11:48 pm
Location: Irvine California

Re: Program works in Studio not via exe

Post by SeanP » Thu Jan 13, 2011 6:03 pm

I can look into sending you our Ranorex project... but our application wont work on a normal PC... it interacts with a large number of hardware devices and well... just wont work. Besides that I cant release our software outside the building. I dont have the authority. Ill try to get you the Ranorex project though.

Sean

Update... I have attached the failing project. I think the repository item name is "somebutton3"
You do not have the required permissions to view the files attached to this post.

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

Re: Program works in Studio not via exe

Post by Support Team » Fri Jan 14, 2011 1:30 pm

Hi,

Depending on your log files it seems the parent folders are not uniquely enough. Please make sure that all of its parent folders have a unique path. You can also try to disable caching for the parent folders. Therefore please take a look to following link
http://www.ranorex.com/support/user-gui ... html#c2076

Regards,
Peter
Ranorex Team

SeanP
Posts: 60
Joined: Wed Sep 01, 2010 11:48 pm
Location: Irvine California

Re: Program works in Studio not via exe

Post by SeanP » Fri Jan 14, 2011 10:20 pm

We have decided to just re-record the project in question and move on. However it is noted that caching should be disabled for other items in the project we build which have issues detecting elements.

Thanks for the help... will post if we run across another issue.

Sean

SeanP
Posts: 60
Joined: Wed Sep 01, 2010 11:48 pm
Location: Irvine California

Re: Program works in Studio not via exe

Post by SeanP » Wed Feb 02, 2011 12:47 am

Support Team wrote:Hi,

Depending on your log files it seems the parent folders are not uniquely enough. Please make sure that all of its parent folders have a unique path. You can also try to disable caching for the parent folders. Therefore please take a look to following link
http://www.ranorex.com/support/user-gui ... html#c2076

Regards,
Peter
Ranorex Team

Is there a downside to disabling caching? Basically, what does disabling it do? What issues can I expect to have to possibly deal with?

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

Re: Program works in Studio not via exe

Post by Support Team » Wed Feb 02, 2011 2:25 pm

Hi,

have a look at following post which will answer your questions:
http://www.ranorex.com/forum/disable-ca ... html#p3461

Regards,
Tobias
Support Team