Page 1 of 1

How to Select a File from JFileChooser

Posted: Mon Jan 16, 2012 1:46 pm
by aunal
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.

Re: How to Select a File from JFileChooser

Posted: Mon Jan 16, 2012 6:15 pm
by Support Team
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