Problem: Call TextBox with the name "" (null)

Feb 23, 2010 at 9:06 AM

Hallo,

What is the warning meaning of "NonComVisibleBaseClass was detected".

I pressed "F5" and the programm runs further. I met this question  by searching

a TextBox without name or the name is "" detecting by UI Spy and it is the only

one TextBox in the window.

I use as following:

TextBox text=window.Get<TextBox>(SearchCriteria.ByControlType(ControlType.Edit));

Thanks very much!

Mar 12, 2010 at 12:20 PM

I have tried many times and I don't know, whether it is a bug of white or it is my problem.

When the name of the TextBox is "",  the test will stopps at the searching of TextBox, but click F5, it runs further

without problem.

Can you help me to try this?

Thanks a lot !

Coordinator
Mar 12, 2010 at 1:08 PM

Are you running the test and the application under test in the same process?

Mar 12, 2010 at 3:42 PM

 Why may the problem  be related to pocess? 

I have checked and  there is only one difference between this TextBox and other TextBoxes , which are correctly called in other modal windows. When theText of this TextBox is set, the name of the TextBox changes too, the value is same with Text.

Other TextBoxes have always unchanged name. I don't know, whether this causes the problem or not.

Thanks.

Mar 13, 2010 at 6:34 PM
Edited Mar 13, 2010 at 6:37 PM
eastjie wrote:

 Why may the problem  be related to pocess? 

=> White does not support such kind of testing!!!!. White can't find windows if the system under test and the test run's in the same process.

Other questions

point 9

 

Throndorin

Mar 17, 2010 at 9:53 AM
Throndorin wrote:
eastjie wrote:

 Why may the problem  be related to pocess? 

=> White does not support such kind of testing!!!!. White can't find windows if the system under test and the test run's in the same process.

Other questions

point 9

 

Throndorin

 Thanks for your suggestion. I have checked. There is no problem to find the window and the other widgets in this window, e.g. Button can be correctly found. Only by searching this TextBox, there is a problem.

Mar 17, 2010 at 12:09 PM

What kind of Application is it? (WPF, Windows Forms)

can you call LogStructure on the window element, and post result here?

 

Mar 17, 2010 at 12:32 PM
Edited Mar 17, 2010 at 12:34 PM
Throndorin wrote:

What kind of Application is it? (WPF, Windows Forms)

can you call LogStructure on the window element, and post result here?

 

[2010-03-17 12:27:55,459][INFO ] AutomationId:
ControlType: ControlType.Window
Name: Materialnummer
HelpText:
Bounding rectangle: 104;26;390;90
ClassName: DialogFrameCL27970840
IsOffScreen: False
FrameworkId: Win32
ProcessId: 364

System.Windows.Automation.WindowPattern
System.Windows.Automation.TransformPattern

    AutomationId: 1
    ControlType: ControlType.Button
    Name: Hinzufügen...
    HelpText:
    Bounding rectangle: 111;88;83;21
    ClassName: Button
    IsOffScreen: False
    FrameworkId: Win32
    ProcessId: 364

    System.Windows.Automation.InvokePattern

    AutomationId: 2
    ControlType: ControlType.Button
    Name: Abbrechen
    HelpText:
    Bounding rectangle: 200;88;83;21
    ClassName: Button
    IsOffScreen: False
    FrameworkId: Win32
    ProcessId: 364

    System.Windows.Automation.InvokePattern

    AutomationId: 9693
    ControlType: ControlType.Edit
    Name:
    HelpText:
    Bounding rectangle: 111;59;376;21
    ClassName: COI_EDITCONTROL
    IsOffScreen: False
    FrameworkId: Win32
    ProcessId: 364

    System.Windows.Automation.ValuePattern
    System.Windows.Automation.TextPattern

    AutomationId: TitleBar
    ControlType: ControlType.TitleBar
    Name: Materialnummer
    HelpText:
    Bounding rectangle: 108;30;382;26
    ClassName:
    IsOffScreen: False
    FrameworkId: Win32
    ProcessId: 364


        AutomationId: SystemMenuBar
        ControlType: ControlType.MenuBar
        Name: Systemmenüleiste
        HelpText:
        Bounding rectangle: 108;30;18;25
        ClassName:
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 364


            AutomationId: Item 1
            ControlType: ControlType.MenuItem
            Name: System
            HelpText:
            Bounding rectangle: 108;30;18;25
            ClassName:
            IsOffScreen: False
            FrameworkId: Win32
            ProcessId: 364

            System.Windows.Automation.ExpandCollapsePattern

        AutomationId: Close
        ControlType: ControlType.Button
        Name: Schließen
        HelpText:
        Bounding rectangle: 466;30;24;24
        ClassName:
        IsOffScreen: False
        FrameworkId: Win32
        ProcessId: 364

        System.Windows.Automation.InvokePattern


 This is the result of LogStructure().

AutomationId: 9693
    ControlType: ControlType.Edit
    Name:
    HelpText:
    Bounding rectangle: 111;59;376;21
    ClassName: COI_EDITCONTROL
    IsOffScreen: False
    FrameworkId: Win32
    ProcessId: 364

I can not find this TextBox. Thanks!

Mar 17, 2010 at 1:05 PM
Edited Mar 17, 2010 at 1:07 PM

can you please try this:

 

AutomationElement element = yourWindow.GetElement(SearchCriteria.ByAutomationID("9693");

TextBox box = new TextBox(element, wyourWindow.ActionListener);

 

but in fact I think this will also not work. The Problem seems to be this:

ClassName: COI_EDITCONTROL

 

it seems that this class is not developed correct or the interface is defekt

 

Mar 17, 2010 at 5:03 PM
Throndorin wrote:

can you please try this:

 

AutomationElement element = yourWindow.GetElement(SearchCriteria.ByAutomationID("9693");

TextBox box = new TextBox(element, wyourWindow.ActionListener);

 

but in fact I think this will also not work. The Problem seems to be this:

ClassName: COI_EDITCONTROL

 

it seems that this class is not developed correct or the interface is defekt

 

 Thanks,Throndorin. I think you are right. The problem may be related to the class. I have tried your methods. I have testet the

window twice. At the first time, the TextBox can be called by your way. But the second time, it is again not found.  It's funny.

I have not quite unstand White. Is White just actully a GUI test tool?   

Mar 18, 2010 at 8:43 AM
eastjie wrote:

I have not quite unstand White. Is White just actully a GUI test tool?   

 

White is a framework based on Microsoft UIAutomation and yes it is a GUI Test environment.

 

Throndorin