Test skips steps when run from command line.

Bug reports.
kmck
Certified Professional
Certified Professional
Posts: 83
Joined: Fri Jul 12, 2013 2:41 pm

Test skips steps when run from command line.

Post by kmck » Tue Jan 21, 2014 8:22 pm

Environment details:
OS: Windows 2008 R2
Ranorex v.4.1.2.16100
.NET Runtime v. 4.0.30319.1

I have a test case that has a few WinForm objects that show as an element attribute (as opposed to text, button, etc). My test case types data into text boxes (all element attributes) and then clicks a button (also element attribute), and it works perfectly when run from the Test Suite Runner.

However...

I need to run this from command line and when I do, the report shows that the steps have been completed successfully, but no actions are being taken on these items. I have tried numerous workarounds (clicking on the form and using the tab button to navigate to each element, for example), none of which have worked. The actions are being run through and completed as successful, but nothing actually happens on screen.

I have included a screenshot with the form, as well as the corresponding elements as listed in Ranorex Spy, as well as a snapshot of the application.

Any help would be greatly appreciated.
InstallingLT.PNG
Screenshot
InstallingLT.PNG (92.8 KiB) Viewed 830 times
Attachments
InstallingLTSnapshot.rxsnp
Snapshot
(30.3 KiB) Downloaded 120 times

User avatar
mebner
Posts: 61
Joined: Tue Dec 17, 2013 6:42 pm

Re: Test skips steps when run from command line.

Post by mebner » Wed Jan 22, 2014 1:32 pm

Hi,

Does it work when you start it with Ranorex Studio?
What I can see from the snapshot, you can use the "AccessibleName" attribute to uniquely identify most of the elements. Could you therefore change the RxPath of your items to use the AccessibleName?
Does it work after you changed it?
What you could also try is to add the process, or the specific classes, to the GDI capture list as described here: Testing of Legacy Applications.

Regards,
Markus

kmck
Certified Professional
Certified Professional
Posts: 83
Joined: Fri Jul 12, 2013 2:41 pm

Re: Test skips steps when run from command line.

Post by kmck » Wed Jan 22, 2014 1:58 pm

Hi Markus,

The suite runs through perfectly using Ranorex Studio, but it will not even focus on those objects when run through command line. When manually working with that screen, I can click on the main screen, hit the tab key, and it will focus on that first text box. However, when I automate that same action (as a workaround, since neither clicking directly on the first text box nor using a SendKeys action to that first box object works), it doesn't focus on the object.

GDI capture also does not seem to work for this particular instance.

I'm not sure why it would run fine in Ranorex Studio but not in command line, but so far no workarounds have worked successfully.

kmck
Certified Professional
Certified Professional
Posts: 83
Joined: Fri Jul 12, 2013 2:41 pm

Re: Test skips steps when run from command line.

Post by kmck » Mon Jan 27, 2014 7:30 pm

Hi Markus,

I just wanted to follow up with you on this issue. Do you know of any reason why Ranorex Studio runs through all actions successfully, but running through command line does not?

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

Re: Test skips steps when run from command line.

Post by Support Team » Wed Feb 12, 2014 10:17 am

Hi,

I am sorry for the slow response!

It could have something to do with the privileges, have you already tried to executed the tests as administrator? What happens when you right click on the created Ranorex test executable and select "Run as administrator"?
May I also ask you to go through the points listed on the following link .NET WinForms?

Thanks,
Markus
.
Image