Telerik Forums
Testing Framework Forum
1 answer
91 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
162 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
190 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
91 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
70 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
105 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
96 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
107 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
3 answers
190 views
I've installed latest release of Telerik Testing Framework 2012.1 719 (Jul 19, 2012) and faced following problem.
  • Telerik Chrome extension is enabled
  • open http://google.com
  • enter some search keyword. E.g. "telerik"
  • click on some result at search page
As result, only empty page with redirect URL shown. Redirect to target page is absent. This problem is absent when Telerik extension is disabled. I failed to find to solution for this problem. Can anyone suggest how to fix this issue?

PS. I'm using latest release of the Chrome v. 21.

Plamen
Telerik team
 answered on 23 Aug 2012
1 answer
188 views
Hi, I currently am using a snippet of code similar to this to log into the site under test:

ActiveBrowser.NavigateTo(url);
ActiveBrowser.WaitUntilReady();
username.Text = userName;
password.Text = password;
submit.Click();
ActiveBrowser.WaitUntilReady();

where username is of type HtmlInputText and password is HtmlInputPassword. When I'm running this, the log in works most of the time. However, I've also been frequently getting this error:

System.ArgumentException : Invalid input type 'Text' for this control. Control was expecting 'Password'
at ArtOfTest.WebAii.Controls.Control.CreateInstance(Element e, Boolean throwIfNull)
at ArtOfTest.WebAii.ObjectModel.Element.As()

The HTML of the password looks like this:
<input id="txtPass" name="password" type="text" title="Password">

However changing the password to HtmlInputText also results in an exception:
Invalid input type 'Password' for this control. Control was expecting 'Text'

Does anyone know what could be causing it?
Byron
Telerik team
 answered on 20 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?