Using White in VMWare Image

Dec 8, 2008 at 3:04 PM
Has anyone had any success using White for UIAutomated tests running in a VMWare image (Windows XPSP2)?

I have tests that run fine on a real OS but when tryingto run the same tests in a VMare image the tests are problematic.

Any suggestions?

Cheers,

James
Coordinator
Dec 8, 2008 at 4:43 PM
i have done this before when my case was other way around.
which controls are you facing problem with?
Dec 8, 2008 at 4:47 PM
Hi Vivek,

One problem is with finidng the MenuBar on the application, the following line fails with the following error.

mANB.MainApplicationWindow.MenuBar.MenuItem("Tools", "Options...").Click();

Core.UIItems.UIActionException : Could not make the MenuBar with AutomationId=MenuBar and Name=Application visible, after waiting for 5000 ms
TearDown : System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
  ----> System.NullReferenceException : Object reference not set to an instance of an object.
 d:\white-os\Core\UIItems\Scrolling\ScreenItem.cs(32,0): at Core.UIItems.Scrolling.ScreenItem.<MakeVisible>b__2()
 D:\bricks\Bricks\Core\Clock.cs(54,0): at Bricks.Core.Clock.RunWhile(DoAndNoReturn do, Condition condition, Expired expired)
 d:\white-os\Core\UIItems\Scrolling\ScreenItem.cs(27,0): at Core.UIItems.Scrolling.ScreenItem.MakeVisible(VerticalSpan verticalSpan)
 d:\white-os\Core\UIItems\WindowItems\Window.cs(368,0): at Core.UIItems.WindowItems.Window.ActionPerforming(UIItem uiItem)
 d:\white-os\Core\Interceptors\ScrollInterceptor.cs(13,0): at Core.Interceptors.ScrollInterceptor.PreProcess(IInvocation invocation, Object target)
 D:\bricks\Bricks\DynamicProxy\DynamicProxyInterceptors.cs(19,0): at Bricks.DynamicProxy.DynamicProxyInterceptors.<>c__DisplayClass6.<Process>b__4(DynamicProxyInterceptor obj)
 at System.Collections.Generic.List`1.ForEach(Action`1 action)
 D:\bricks\Bricks\DynamicProxy\DynamicProxyInterceptors.cs(19,0): at Bricks.DynamicProxy.DynamicProxyInterceptors.Process(IInvocation invocation, InterceptContext interceptedContext)
 d:\white-os\Core\Interceptors\CoreInterceptor.cs(29,0): at Core.Interceptors.CoreInterceptor.Intercept(IInvocation invocation)
 d:\OSS\Castle\Tools\Castle.DynamicProxy2\Castle.DynamicProxy\AbstractInvocation.cs(165,0): at Castle.DynamicProxy.AbstractInvocation.Proceed()
 at MenuBarProxy7bb606f73d8a4a17bd112aae6bbbcb0d.get_Visible()
  --TearDown
 at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
 at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
 at NUnit.Core.TestMethod.doTearDown(TestCaseResult testResult)
 --NullReferenceException

As I said on a native OS this works fine.

Cheers,

James
Coordinator
Dec 10, 2008 at 5:09 PM
MenuBar/MenuStrip and ToolStrip are controls known controls have problem with UIA.
Do you see any difference in os version. (try running winver command and see the difference.