How to retrieve the Border color of a TextBox

Aug 18, 2008 at 9:32 AM
Hi 
    
    Could you please let me know how to retrieve the TextBox border in an WPF Application. I suppose the border color is set inside the "Borderbrush" field. have any one ablte to fetch this information from the application using white..

This is what i am able to see in the window.LogStructure();

 

AutomationId: ctlAbn
ControlType: ControlType.Edit
Name: ABN:
HelpText:
Bounding rectangle: 475,455,100,20
ClassName: TextBox
IsOffScreen: False

    AutomationId: VerticalScrollBar
    ControlType: ControlType.ScrollBar
    Name:
    HelpText:
    Bounding rectangle: 476,456,0,0
    ClassName: ScrollBar
    IsOffScreen: True

    AutomationId: HorizontalScrollBar
    ControlType: ControlType.ScrollBar
    Name:
    HelpText:
    Bounding rectangle: 476,456,0,0
    ClassName: ScrollBar
    IsOffScreen: True


Thanks
Bagya

Aug 19, 2008 at 10:22 AM

Hi

    Do we have any update on this. I am stuck up here in getting the Max Lenght , Border and Background Color of the Textbox. can someone let me know if they have found a way to resolve this.

Thanks

Bagya

 

 

 

Coordinator
Aug 19, 2008 at 8:20 PM
You would not be able to get these information using White because it is based on UIAutomation which doesn't reveal such information.
I am leaving this open as an issue in case I find Win32 messages to get these info. Anyone here?
Aug 20, 2008 at 10:35 AM

Hi Vivek

    I tried accessing the text box properties using  Quick Test Professinal. I am able to get the Max Length , Background color and Text Box Border. If QTP can see those properties why not UI Automation able to extract those default properties. There should be some way using which we should be able to pull out those information from WPF textbox.

   Does anyone tried this out....


Thanks
Bagya

 

Coordinator
Aug 20, 2008 at 4:15 PM
Its good to know that. I would try to figure how it can be done without UIAutomation in White may be using window messages.
Coordinator
Nov 9, 2008 at 1:30 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.