Clicking OK on a dialog box produces an Intercept

Dec 14, 2009 at 5:36 PM


I have a very simple case where I have a dialog box open, and I am using white to automate the selection of a radio button, then the click of the OK button.

Simple enough, right? Well the code for clicking the OK button is:


This produces the expected result (i.e. the dialog box goes away), but the problem is that after the dialog box is gone, there is an intercept, followed by a System.Windows.Automation.ElementNotAvailableException.

Weirder still is that is happens on only two of our three boxes running identical builds of the software under test.

Can anyone shed some light on why this intercept is occurring after the button-click apparently seems to work? Thank you!


Te stack trace is:

Core.dll!Core.UIItems.WindowItems.Window.WaitWhileBusy() Line 175 + 0xbf bytes
Core.dll!Core.UIItems.Actions.Action.Handle(Core.UIItems.WindowItems.Window window = {Insurance Verification Validation}) Line 24 + 0xb bytes
Core.dll!Core.UIItems.WindowItems.Window.ActionPerformed(Core.UIItems.Actions.Action action = {Core.UIItems.Actions.Action}) Line 230 + 0xb bytes
Core.dll!Core.InputDevices.Mouse.ActionPerformed(Core.UIItems.Actions.ActionListener actionListener = {Insurance Verification Validation}) Line 163 + 0x42 bytes
Core.dll!Core.InputDevices.Mouse.Click(System.Windows.Point point = {893,546}, Core.UIItems.Actions.ActionListener actionListener = {Insurance Verification Validation}) Line 158 + 0x8 bytes
Core.dll!Core.UIItems.UIItem.InternalClick() Line 214 + 0x73 bytes
Core.dll!Core.UIItems.UIItem.Click() Line 208 + 0xb bytes
[External Code]    
Core.dll!Core.Interceptors.CoreInterceptor.Intercept(Castle.Core.Interceptor.IInvocation invocation = {ButtonProxy534a84892e25439081b2107567ffbc4d.InvocationClick_13}) Line 24 + 0x28 bytes
[External Code]    
ERIITest.WhiteAutomation.dll!ERIITest.WhiteAutomation.FormFixtures.PatientDemographicsFormFixture.EnhancedEligibilityResolution.ClickSave() Line 307 + 0x3a bytes

Dec 14, 2009 at 7:16 PM

can you explain what you mean by intercept?

Dec 14, 2009 at 7:40 PM

Thanks for the prompt reply!

The intercept I am referring to is shown in the call stack. The last line is the call to the method that clicks the button using the command Window.Get<Button>("btnOK").Click();

Immediately after that there is an [External Code] call followed by:

Core.Interceptors.CoreInterceptor.Intercept(Castle.Core.Interceptor.IInvocation invocation = {ButtonProxy534a84892e25439081b2107567ffbc4d.InvocationClick_13})

As I said above, the button gets clicked, and the window is dismissed, so That would be all I need for White to do I am puzzled about why the code takes this detour and doesn't just move on.



Dec 15, 2009 at 8:39 AM

I have added the explanation for this here