Browse file in File open dialog fails

Ask general questions here.
Posts: 20
Joined: Fri Dec 18, 2015 8:07 am

Browse file in File open dialog fails

Post by sivakumaran » Tue Jun 07, 2016 6:33 am

Hello Ranorex team,

in our test suite, there is a testcase to browse some files, it do not work

after the File open dialog is up, focus is on the edit control - Filename
want to select all files in a folder by Ctrl + A
inorder to do that, i have to bring the focus to the listbox
So I tried calling 1. Invokeaction with focus and the rxPath of the listbox - did not work
2. Mouseclick in the center region of the listbox - did not work
Ranorex was not able to discover the listbox control in 30 seconds
works on all our machines here in india, unfortunately the solution is not working on a machine in Germany. the machine configuration is windows 7 machine, 64 bit, 8GB RAM
please note,
1. it works if we take remote here from india and execute remotely that test suite.
2. it works after increasing the timeout to 2 minutes.
would like to know why it doesn't work as it is.

the log looks like
00:18.111 Info Data Current variable values:
$VarUILanguage = 'Deutsch (Deutschland)'
00:18.158 Warn Data

The following module variables are not bound to a data column:
varDigsiLanguage_ImportDDD, NewVariable, VarFiledialogTitle, VarImportFileNameText, VarFileDialogItemsView, VarInstallButton, VarRestartDigsi, VarValidateImportDDD
00:50.497 Info Keyboard

Key sequence D:\DigsiDrivers{Return} with focus on 'DDD_handling.FileName'.
00:53.180 Info Wait

Waiting 2m for item 'DDD_handling.Elementansicht' to exist.
01:26.985 Info Mouse

Mouse Left Click item 'DDD_handling.Elementansicht' at Center.
01:59.153 Info Mouse

Mouse Left Move item 'DDD_handling.Elementansicht' at Center.
02:34.455 Info Keyboard

Key 'Ctrl+A' Press with focus on 'DDD_handling.Elementansicht'.
03:06.030 Info Mouse

Mouse Left Click item 'DDD_handling.OEffnen' at Center.
03:06.950 Info Mouse

Mouse Left Click item 'DDD_handling.InstallButton' at Center.


User avatar
Ranorex Guru
Ranorex Guru
Posts: 6781
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Browse file in File open dialog fails

Post by odklizec » Tue Jun 07, 2016 7:35 am

Hi Siva,

I guess the application you are trying to automate is something web-based? Apparently, it takes some time to open the file dialog and load its data, which I guess are loaded from a remote server (form Germany)?

I would suggest you to use WaitForExists action/method instead of hardcoded delay. You will just have to create an xpath, which is found by Ranorex only if the dialog is fully loaded? For example, an xpath pointing to the listbox you want to set focus on. Using WaitForExists is much better and reliable way to wait for things than using Delay. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration