Telerik Forums
Testing Framework Forum
3 answers
652 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
153 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
113 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
203 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
213 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
158 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
120 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
125 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
122 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
1 answer
171 views
Hello All,

I am using test studio from VSTS to record my test.
I am able to record the test successfully but it fails when i try to run it using quick execute.





Log file shows following error message:


-------------------------------------------------------
'8/23/2012 12:25:36 PM' - Using .Net Runtime version: '4.0.30319.1' for tests execution.
'8/23/2012 12:25:36 PM' - Starting execution....
'8/23/2012 12:25:36 PM' - Failure detected during execution. Details:
------------------------------------------------------------
'8/23/2012 12:25:36 PM' - System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
   at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
   at System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit)
   at ArtOfTest.WebAii.Silverlight.SilverlightApp.InitializeCustomTypes()
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InitializeWeb(ExecutionEngineCreateParams initParams)
   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.CreateAndInitializeEngine(Test test, ExecutionEngineCreateParams cp)
   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)

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].

------------------------------------------------------------
'8/23/2012 12:25:36 PM' - Test completed!





I read a similar post "http://www.telerik.com/automated-testing-tools/community/forums/test-studio-express/automation-framework/unable-to-execute-quickstarts-vsts-vb-project.aspx" and cross verified my project properties. But it's still not working.
One thing that I didn't find is: You have asked to exclude the app.config file from the project and ten rebuild the  test.]
I didn't find any such file in my project.



Thanks and Regards,
Shruti


Plamen
Telerik team
 answered on 23 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?