Click here to Skip to main content
       

Windows API

 
GeneralRe: vbscript processes for current user Pinmemberjan212r10-Apr-13 2:39 
GeneralRe: vbscript processes for current user PinmvpDave Kreskowiak10-Apr-13 3:40 
GeneralRe: vbscript processes for current user PinmemberMicroVirus10-Apr-13 9:57 
QuestionSetSecurityInfo() broken on Windows8? PinmemberErudite_Eric1-Apr-13 2:14 
AnswerRe: SetSecurityInfo() broken on Windows8? [modified] PinmvpDave Kreskowiak1-Apr-13 2:45 
QuestionTurn off my Wifi adaptor PinmemberAK7758126-Feb-13 13:46 
AnswerRe: Turn off my Wifi adaptor PinmvpRichard MacCutchan26-Feb-13 22:37 
QuestionInteraction with a dialog box PinmemberShaiBen13-Jan-13 6:00 
Hi
I'm trying to write automation to a test a web site with C#.
I'm using selenium web driver but it cannot interact with native windows. so i'm using winAPI to control a dialog window.
 
I am trying to automaticly upload a file by interacting with the Dialog window.
 

I have managed to get a handle on the window using the following code:
 
public const int WM_SYSCOMMAND = 0x0112;
       public const int SC_CLOSE = 0xF060;
       public const int WM_SETTEXT = 0x000C;
       private void ChooseFile()
       {
           // retrieve the handler of the window
           int iHandle = FindWindow("#32770", "File Upload");
 

 
           if (iHandle > 0)
           {
              //Choose File - using a string with the file path
              //Press OK
           }
       }
 
What I need to do next is choose the file to upload and then press OK to approve.
 
Help will be much appreciated Smile | :)
AnswerRe: Interaction with a dialog box Pinmemberanton_V17-Feb-13 3:03 
QuestionWindows RT Bluetooth PinmemberCollin Jasnoch9-Jan-13 2:58 
AnswerRe: Windows RT Bluetooth PinprotectorPete O'Hanlon9-Jan-13 3:03 
GeneralRe: Windows RT Bluetooth PinmemberCollin Jasnoch9-Jan-13 3:08 
GeneralRe: Windows RT Bluetooth PinprotectorPete O'Hanlon9-Jan-13 3:13 
GeneralRe: Windows RT Bluetooth PinmemberCollin Jasnoch9-Jan-13 3:41 
Questionendless WM_MOUSEWHEEL events Pinmembered welch28-Dec-12 6:02 
AnswerRe: endless WM_MOUSEWHEEL events PinmvpRichard MacCutchan28-Dec-12 23:20 
GeneralRe: endless WM_MOUSEWHEEL events Pinmembered welch29-Dec-12 1:58 
GeneralRe: endless WM_MOUSEWHEEL events PinmvpRichard MacCutchan29-Dec-12 2:05 
GeneralRe: endless WM_MOUSEWHEEL events Pinmembered welch29-Dec-12 2:52 
GeneralRe: endless WM_MOUSEWHEEL events PinmemberEddy Vluggen29-Dec-12 3:37 
GeneralRe: endless WM_MOUSEWHEEL events Pinmembered welch29-Dec-12 7:57 
GeneralRe: endless WM_MOUSEWHEEL events PinmemberEddy Vluggen29-Dec-12 8:09 
GeneralRe: endless WM_MOUSEWHEEL events Pinmembered welch29-Dec-12 10:42 
GeneralRe: endless WM_MOUSEWHEEL events PinmemberSledgeHammer0129-Dec-12 12:16 
Questionwin32 Pinmemberusermina122-Dec-12 21:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.140421.2 | Last Updated 15 Apr 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid