Telerik Forums
Testing Framework Forum
3 answers
1.1K+ views
Getting the Error message while executing the test cases on the build server, what could be the problem for this error as the tests are executing good till yesterday morning we are geting this problem from yesterday evening.
Looks getting the problem while taking the snapshot.

executing fine while execute from other systems on the build platform.




Getting the Error message :

Overall Result: Fail
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Parameter is not valid.
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at System.Drawing.Bitmap..ctor(Image original, Int32 width, Int32 height)
   at System.Drawing.Bitmap..ctor(Image original)
   at ArtOfTest.WebAii.Design.Utils.BinaryToBitmap(Byte[] imageBytes)
   at ArtOfTest.WebAii.Design.AutomationHostState..ctor(SerializationInfo info, StreamingContext context)
   --- End of inner exception stack trace ---

Server stack trace:
   at System.RuntimeMethodHandle._SerializationInvoke(IRuntimeMethodInfo method, Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
   at System.Runtime.Serialization.ObjectManager.DoFixups()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream stm)
   at System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage.FixupForNewAppDomain()
   at System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(IMessage reqMsg)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at ArtOfTest.WebAii.Design.Execution.ITestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, ExecutionType exeType, Int32 lastStepIndex, DebuggerOptions debuggerOptions)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteTest(Test testcase, Settings settings, String testBinaryFolder, String deploymentFolder, ExecutionType exeType, Int32 lastStepIndex, DebuggerOptions debuggerOptions)
------------------------------------------------------------
'04/05/2011 16:31:32' - Overall Result: Fail
'04/05/2011 16:31:32' - Duration: [0 min: 21 sec: 165 msec]
------------------------------------------------------------
Stoich
Telerik team
 answered on 06 Sep 2012
3 answers
679 views

Hello.

i run my tests with jenkins configured building and running tests on remote computer.

tests all ok but each test throw exception

 

Internal error: An unhandled exception occurred.
The exception occurred while test step 'test10' was running.
System.Threading.ThreadAbortException: Thread was being aborted.
   at ArtOfTest.WebAii.Messaging.Process.BrowserRemoted.AsyncListenerThreadEntry()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

tests runs without exception on local computer.
Cody
Telerik team
 answered on 05 Sep 2012
1 answer
166 views
Hello,

When I am using next code to get computed CSS style value it works in every browser except FireFox (v.14.0.1 and v.15.0):
string style = new HtmlControl(element).GetComputedStyleValue("font-family");
I have managed to proceed with workaround in JS, but it looks like something wrong with plugin in latest FF browser versions.

string script = @"function getstyle() {var el = document.getElementById('" + element.IdAttributeValue + "');" +
"var computedStyles = window.getComputedStyle(el, null);\n" +
"return computedStyles.getPropertyValue('font-family')}\n getstyle()";
style = Actions.InvokeScript<string>(script);

The exception thrown listed below:

ArtOfTest.WebAii.Exceptions.ExecuteCommandException was unhandled by user code
  Message=ExecuteCommand failed!
InError set by the client. Client Error:
mozCommandProcessor: ReferenceError: family is not defined
BrowserCommand (Type:'Information',Info:'ComputedStyle',Action:'NotSet',Target:'ElementId (tagName: 'div',occurrenceIndex: '11')',Data:'font-family',ClientId:'226bfc0e-c75f-4d6d-8837-eed994cd46c2',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'mozCommandProcessor: ReferenceError: family is not defined')
InnerException: none.


Plamen
Telerik team
 answered on 03 Sep 2012
1 answer
119 views
I am opening 2 browsers and want to know if I can record some steps in Browser2, then set the ActiveBrowser back to Browser1 so I can record test steps in there. Can this be done or is ActiveBrowser always the last browser launched?
Cody
Telerik team
 answered on 28 Aug 2012
1 answer
211 views
Hi Telerik Team, 

I am Facing Problems in Handling the Download Dialog in WPF-Application. All the exemples and solutions that i found, are talking about internet explorer & Browsers. I have a WPF-Application and tring to test the Feature: " Save and Load"

First
I need to save the state, than to load the state. The state will be save as an XML-File with the extension " xxx.playlist". The test studio can't handle this window dialiog (see figure).

I have tried to program the save action, but it is not working.

Here is my code:

 

[CodedStep(@"Click Save")]
        public void A022_001_SaveAndLoad_CodedStep2()
        {
            var settings = new Settings();
            settings.Wpf = new ArtOfTest.WebAii.Core.Settings.WpfSettings("\"C:\\Program Files (x86)\\ClipJOCKEY_Nexio\\ClipJOCKEY.exe\"");
            var manager = new Manager(settings);
            manager.Start();
            var theApp = manager.ActiveApplication;
            SaveAsDialog saveDlg = SaveAsDialog.CreateSaveAsDialog(manager.ActiveApplication, DialogButton.SAVE, "test");
            manager.DialogMonitor.AddDialog(saveDlg);
            Thread.Sleep(15000);
            manager.DialogMonitor.Start();
    
            // LeftClick on Item180Textblock
            Applications.ClipJOCKEYexe.ClipJOCKEY.Item180Textblock.User.Click(ArtOfTest.WebAii.Core.MouseClickType.LeftClick, 17, 25, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0)));
 
            Thread.Sleep(15000);
            manager.DialogMonitor.Stop();
            Thread.Sleep(15000);
        }

 

 

The object manager.ActiveApplicationis is always in debugging initialized to zero. How can how can I initialize it? is that correct what I'm doing? Do you know the solution?

greeting and thanks
Mostafa

 

 

Plamen
Telerik team
 answered on 27 Aug 2012
4 answers
220 views

Hi.

I want to run tests on another computer but when i run it exception throw.

          • Set Up
            System.ApplicationException: Exception thrown attempting to launch Internet Explorer. Please make sure Internet Explorer is properly installed and you are able to launch it. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
            FileName: Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
            FusionLog: WRN: Assembly binding logging is turned OFF.
            To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
            Note: There is some performance penalty associated with assembly bind failure logging.
            To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

            at ArtOfTest.Common.Win32.Connector.InjectCode(IntPtr handle, String assemblyAndClass, String pipename, String pid, Boolean waitForDocument)
            at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename)

            --- End of inner exception stack trace ---
            at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename)
            at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
            at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch)
            at WebAiiFrameWork.TestsBase.MyTestInitialize()
          •  I try to run on WinXP x32 IE8 and Win7 x32 IE9.

Konstantin Petkov
Telerik team
 answered on 27 Aug 2012
1 answer
261 views
I'm trying to build automated tests for an application that has only bits of it implemented in Silverlight. When I connect to the path of the application it sends this error: "It's not a valid Wpf Application!" 

Does this mean that I can't record any of the test steps for this program? 
Konstantin Petkov
Telerik team
 answered on 27 Aug 2012
1 answer
127 views
Can I access the Selection, ContentStart, and ContentEnd properties of a System.Windows.Controls.RichTextBox in Silverlight automation? Do I have to write my own FrameworkElement wrapper to do so?
Konstantin Petkov
Telerik team
 answered on 27 Aug 2012
1 answer
142 views
Hi. 
The question is in the title. I tried to use TypeText method but looks like it's not working. There is a property Text, but it's read-only. Also I didn't found any examples with RadMaskedInput controls in the sample solution which installs with the framework. Maybe I am missing something: some property or method? please help.
Plamen
Telerik team
 answered on 24 Aug 2012
1 answer
134 views
Hi all,

the following piece of code returns different result on IE9 and FireFox14 browsers when attribute does not exist for specified element:
HtmlControl control = Get(xpath, browser, errorMessage).As<HtmlControl>();
string returnValue = control.GetValue<string>(attribute.ToString().ToLower());
return returnValue;

on IE9  returnValue is equal to '' (empty string)
and on FireFox it is equal to 'null' (this is not NULL reference, this is a string 'null')

This function has the following remark:
Remarks:
The property is retrieved by executing Javascript on the client side using the specified property name as the Javascript function.
so I suppose it "forwards" the result from browser that executes Javascript.

However, I expect methods to be browser-independent -> return the same result irrespectively of browser that is used.

Can you please comment whether:
1. I'm doing something wrong
2. this should be treated as a defect that will be fixed some day
3. this should be treated as a defect that will be never fixed
4. this is a feature (please explain why)
Plamen
Telerik team
 answered on 24 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?