Test Failure System.ArgumentException

2 posts, 0 answers
  1. Richard
    Richard avatar
    13 posts
    Member since:
    Feb 2012

    Posted 16 Mar 2012 Link to this post

    Ran into this message on an automated test I ran today using FireFox.  Looks like it failed at the start of execution.  Any insights as to the cause?  The other odd thing is that while I was watching the screen during execution, opening and closing browser windows during navigation test steps, one of the FireFox windows appeared completely blank/white with the text "Preparing the browser for automation".  From this point on, each subsequent browser window opened in FireFox looked the same and none of them closed -- they simply stacked up one after another.  ??? 

    ------------------------------------------------------------
    '3/16/2012 4:36:27 PM' - Using .Net Runtime version: '4.0.30319.239' for tests execution.
    '3/16/2012 4:36:27 PM' - Starting execution....
    '3/16/2012 4:36:49 PM' - Failure detected during execution. Details:
    ------------------------------------------------------------
    '3/16/2012 4:36:49 PM' - System.ArgumentException: Hwnd of zero is not valid.
       at System.Windows.Interop.HwndSource.CriticalFromHwnd(IntPtr hwnd)
       at ArtOfTest.Common.Win32.Window.GetRectangle()
       at ArtOfTest.Common.Win32.Window.GetBitmap(Size windowSize)
       at ArtOfTest.Common.Win32.Window.GetBitmap()
       at ArtOfTest.WebAii.Design.AutomationHostState.FromBrowser(Browser browser, BrowserStateCaptureMode mode)
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.GetHostState(IAutomationHost host, BrowserStateCaptureMode captureMode)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.CaptureCurrentState(AutomationStepResult currentStepResult, Exception ex)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteSteps(AutomationStepList stepList, TestResult testResult, Object codeBehindInstance, Boolean& stopExecution)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTestIteration(Object codeBehindInstance)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)
    ------------------------------------------------------------
    '3/16/2012 4:36:51 PM' - Test completed!

  2. Ivaylo
    Admin
    Ivaylo avatar
    781 posts

    Posted 19 Mar 2012 Link to this post

    Hello Richard,

    To overcome the Firefox problem, please do the following:

    • First, please ensure that our Firefox extension is installed and enabled as seen in this article.
    • If the extension is enabled and it still doesn't work, click on the Firefox "Tools" button and select "Advanced" options.
    • Under the "Network" heading, click on the "Settings" button.
    • From the Connection Settings select "No proxy". See this video.

    Please let me know if you're still unable to get this to work.


    Kind regards,
    Ivaylo
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top