White can't use with 64 bit windows?

Feb 2, 2010 at 4:49 PM

Hi

I use White 0.19 and NUnit for test in my WPF project with OS window 7 64bit but it not work ,can't test input or get value from any control

But when I move that test code to Vista 32bit it can run with out problem.

Do you have any idea to  used White with windows 64 bit

Thanks,

 

Feb 3, 2010 at 7:29 AM

Hy

 

I think that may a special problem with your project or other circumstances.

 

have you try UISpy or UIA Verify ?

 

I test a WPF application on the same OS without problems

 

Throndorin

 

Feb 3, 2010 at 7:47 AM

Thanks for answers Throndorin

For first time I think like you said my project got problem or some thing in 64 bit OS then I try to run sample of WPF White/NUnit from this web site

http://blogs.msdn.com/john_daddamio/archive/2009/06/18/update-to-testing-wpf-applications-with-the-white-ui-test-framework.aspx

After test it same problem as my project  in windows7 64bit. but it work well in my vista 32 bit.

 

But you can used in windows7 64bit with out problem? Oh some thing strange in my PC or some program in my PC conflict with White.

 

Ok i'll try  UISpy,UIA like you suggest again.

Thanks,

Zeron

Feb 3, 2010 at 8:07 AM
Edited Feb 3, 2010 at 8:07 AM

if UISpy or UIA don't see a visual tree it seems there is something strange on your pc.

 

Maybe the problem is in your used White code.

 

have you debug your test?

 

do you have an White.Core.Application object?

 

Feb 3, 2010 at 8:14 AM
Edited Feb 3, 2010 at 9:18 AM

I'll check it again ,my test code is base on sample  link above ,you can run that sample in 64bit OS?

Edit:

I already check with UISpy in 64 bit OS it work well show tree list about control name and etc in my project.

My test code I think it ok because it can run in 32 bit OS fine, in test can click combo,select combo,input text in textbox and etc.

But when I used same test code with 64 bit OS (same dll not new compile) it not work.

I try to complile in 64 bit OS then used that dll to 32 bit OS it work well in 32 bit but 64 bit not work.

PS. my dev tool is Virtual studio .Net 2008 SP1 language c#

Feb 3, 2010 at 11:11 AM

Hi

the sample works fine on my Win7 x64.

 

It seems that it is a machine specific problem.

can you try on an other machine with Win7x64?

Feb 3, 2010 at 11:20 AM
Edited Feb 3, 2010 at 11:29 AM

Hi,

I try to test with my friend PC,his PC  spec. not same as me but he used OS win7x64 (home premium) same as me.

After run test in his PC it not work too.(result is same as my x64 PC)

And I try to kill many process that run my PC like antivirus,vga driver and etc. but it still not work

You used some x86 emulation or some thing to run test?

Thanks

Feb 3, 2010 at 12:16 PM

no

can you please debug the sample and look where the code not work as expected?

Now I'm out of office,

 

I will try to look for it tomorrow.

 

It's a strange behaviour maybe the responsible of white have a good idea.

 

Throndorin

Feb 3, 2010 at 4:02 PM

refer to that sample above function AddPeopleTest() in UnitTests.cs  this test run in windows 7 64bit

blue message is my comment

               // Start the app
                application = White.Core.Application.Launch("ListBoxExample.exe");
                Assert.IsNotNull(application);

//application run form Window1 show on screen

                // Find the main window
                window = application.GetWindow("Window1", White.Core.Factory.InitializeOption.NoCache);
                Assert.IsNotNull(window);

//window not null found title Window1

                // Add a person using keyboard input
                White.Core.InputDevices.AttachedKeyboard keyboard = window.Keyboard;

                // Tab to the name textbox
                keyboard.PressSpecialKey(White.Core.WindowsAPI.KeyboardInput.SpecialKeys.TAB);
                // Type the name into the name text box
                keyboard.Enter("Harriet");

//focus to textbox but not have any string enter to that textbox

                // Tab to the combobox
                keyboard.PressSpecialKey(White.Core.WindowsAPI.KeyboardInput.SpecialKeys.TAB);
                // Type a g to select Girl
                keyboard.Enter("g");

//focus to combobox expect change to "Girl" item but nothing change still "Boy"

                // Tab to the add button control
                keyboard.PressSpecialKey(White.Core.WindowsAPI.KeyboardInput.SpecialKeys.TAB);
                // Hit the Enter key
                keyboard.PressSpecialKey(White.Core.WindowsAPI.KeyboardInput.SpecialKeys.RETURN);

//focus to add button and nothing happen

 string[] names = { "Tom", "Dad", "Mom", "Jane", };
                Genders[] genders = {Genders.Boy,Genders.Man,Genders.Woman,Genders.Girl, };
             
                // Add a person using White controls
                White.Core.UIItems.ListBoxItems.WPFComboBox comboBox = window.Get<White.Core.UIItems.ListBoxItems.WPFComboBox>("genderComboBox");
                Assert.IsNotNull(comboBox);
                White.Core.UIItems.TextBox nameTextBox = window.Get<White.Core.UIItems.TextBox>("nameBox");
                Assert.IsNotNull(nameTextBox);
                White.Core.UIItems.Button button = window.Get<White.Core.UIItems.Button>("addButton");
                Assert.IsNotNull(button);

//no problem all item is not null

                for (int i = 0; i < names.Length; i++)
                {
                    nameTextBox.Text = names[i];
                    comboBox.SetValue(genders[i]);
                    button.Click();
                }

//no text in nameTextBox and error in NUnit show here because combobox not have any item in it ,must have "girl" "boy" but nothing

I add  more function test  for nameTextBox below

White.Core.UIItems.TextBox nameTextBox = window.Get<White.Core.UIItems.TextBox>("nameBox");
Assert.IsNotNull(nameTextBox);                 //nametextbox is not null
nameTextBox.Enter("ADBD");                      //but not have any text in textbox
 System.Threading.Thread.Sleep(2000);  // for see result in screen
nameTextBox.Text="111";                          //but not have any text in textbox
 System.Threading.Thread.Sleep(2000);
nameTextBox.SetValue("ABCD");              //numTextBox change to  "ABCD"  this input method is work
 System.Threading.Thread.Sleep(2000);

Feb 4, 2010 at 9:18 AM

Hi

 

it seems that Keyboard actions are the biggest Problem right?

Feb 4, 2010 at 9:33 AM

hi,

Not only keyboard but look like all of input are not work in my x64 OS ,I check with mouse click,move input not working too.

I think some problem when get control with White in my PC becuase it can get but it can't control input anything and with combobox refer to that sample

it not have any item after get combobox control.

I don't know what cause that problem in my PC x64 OS and my friend PC .

Thank you very much for your help ^^

Zeron

Feb 4, 2010 at 9:50 AM

Hi,

Sorry a little late and you've gone through the pain we had in the past. White doesn't yet support 64 bit, see - http://white.codeplex.com/Thread/View.aspx?ThreadId=42110. It was expected in 0.19 release (see - http://white.codeplex.com/Thread/View.aspx?ThreadId=49662), but it hasn't made it into that, hopefully it will in the next release. Keep an eye out on the work item - http://white.codeplex.com/WorkItem/View.aspx?WorkItemId=5276

Hope this helps confirm and hopefully it will be fixed soon.

Cheers,
Lax

Feb 4, 2010 at 10:12 AM
Edited Feb 4, 2010 at 10:12 AM

ok this is an answer , if I read the work Item it seems there is a fix possible, if you use x86 Applications instead of x64 Applications.

 

This may the answer why I don't see this problems.

Feb 4, 2010 at 3:17 PM

Thank you for answer ,I'll wait next ver. of White ^^