Unanswered Getting Control ID of a Dialog box - Edit window

  • 9 มีนาคม 2555 3:05
     
     


    Hi,

    I have an active application for automating a web application which works with Windows XP and IE 7, 8 browsers.

    Now, I am trying to support the automation for Windows 7 with IE 9 browser.

    While accessing the web application, it will pop-up a Windows Security Dialog box which asks for username and password for authentication.

    I am able to get the username and password entered in the Edit window of the dialog box. However, I am not able to get the control id of the dialog. 
    During playback this control ID is used to update the username and password correctly in their respective fields of the dialog box.

    In Windows 7 with IE 9 browser, this control ID always returns zero. I am using the GetDlgCtrlID function by passing the Edit window handle.  In Windows XP with IE 7 / 8, I am getting get the values.

    How to get the control id? Is there any other way to handle this? 

    Thanks,
    -Vijay-

ตอบทั้งหมด

  • 10 มีนาคม 2555 7:27
     
     

    Control ID's are optional.  A dialog box can contain controls without a control ID, so if MS decided not to add control ID's, you simply won't be able to get them.

    Now, you sound like you are automating the password prompt.  I recommend that you have a look at UI Automation.  It may be a simpler thing to use in this case.


    Jose R. MCP