How to Select a File from JFileChooser

Ask general questions here.
aunal
Posts: 17
Joined: Mon Jan 16, 2012 10:25 am

How to Select a File from JFileChooser

Post by aunal » Mon Jan 16, 2012 1:46 pm

Hello,

We have just started using Ranorex in our company and currently evaluating to determine whether it is a feasible option or not.

However, I have a problem regarding selecting files from JFileChooser. I can see the individual files with Ranorex Spy and highlight them, however while I'm recording, I observed that file names are trimmed in the Ranorex Repository and thus ranorex cannot access the individual files and uses the coordinates instead.

My configuration is as follows:

Ranorex: 3.2.0.15301
.Net RunTime Version: 2.0.50727.3625

Java: 1.6.0-b105

O/S: Windows XP with SP3

My first guess is; there is a character limit in the repository so ranorex cannot see the complete path to the component and uses the coordinates instead.

I added two screenshots, one taken from Ranorex Spy, showing the components (files in this case) and the other one is from Ranorex Repository, showing the trimmed path to the component.
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: How to Select a File from JFileChooser

Post by Support Team » Mon Jan 16, 2012 6:15 pm

There is a setting in Ranorex (Settings -> General -> "Maximum length of text values in RanoreXPaths"; see attached screenshot) that limits the number of characters that are used for specific text attribute values. If the attribute value has more characters than that number, the value is converted to a regular expression.

For you list items you can either correct the RanoreXPath manually and paste the complete value of the "text" attribute in there; or you can change the above mentioned Ranorex setting to a higher value.

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