Aug 17, 2010 at 10:53 AM
Edited Aug 17, 2010 at 10:56 AM
This is my problem. I have an application where it opens a file open dialog box and I'm trying to enter in the file path and file name into the "File name:" combo box section.
The application loads with a form where you log in. This opens another form where there are a number of buttons. Choosing one of these buttons opens another form. It is in this form that there is a button to select a file. At this stage there's 3 forms opened.
This will open the standard file open dialog box. I can't seem to get a handle on this file open dialog box.
Here's the code I'm using.
Window LoginForm = application.GetWindow("LoginForm");
LoginForm.Get<Button>("btnSelectFiles").Click(); // This is from the 3rd form that is opened
For some reason, I can access all buttons from the other forms using the LoginForm variable.
I've tried the following.
Window FileOpenDialog = application.GetWindow("Open", InitializeOption.NoCache);
This doesn't work.
I've also tried the following but this returns null. I thought that I would be able to access this using the LoginForm variable.
Win32ComboBox comboBox = LoginForm.Get<Win32ComboBox>("Filename");
Any ideas? Thanks