Telerik Forums
Testing Framework Forum
1 answer
162 views
Hi,

The default behavior of Test Studio and the Telerik Testing Framework is to time out after a certain interval if the element is not found. 

I would like to avoid the Timeout Exception and perform a different set of steps depending on whether the element is found. My application does not use silverlight.
I have checked the Telerik help document , Change Silverlight Find Strategy, but i think  it is applicable for only Silverlight applications.

Below is the code snippet which i want to perform if the 'MS2007AboveRadio' check box on the iframe is found. To avoid Timedout Exception if the element is not found, i have placed it in the try catch block. Tried the if else condition aswelll, but it gets timedout.

try
{
    Pages.application.FrameFrame1.MS2007AboveRadio.Check(true, true);
    Pages.application.FrameFrame1.CphMainBtnProceedImage.Click(true);
}
catch
{
}

Please suggest me better way to do it. Do we have something like Find Strategy for a c#.net application.

Regards,
Satyajeet
Plamen
Telerik team
 answered on 19 Sep 2012
4 answers
112 views
Hi,

I'm currently using the webaii2.0.msi using FF 3.6.
Could you pls provide a link to the most recent webaii msi and advice what FF
version it supports ?

Ta.
Plamen
Telerik team
 answered on 19 Sep 2012
2 answers
111 views
Using WebAii framework and C#, I am trying to iterate through all of the menu items to validate access for our application WITHOUT knowing what's there.  I can get the root and children but am having a hard time getting ChildNodes of a Child or going 3 levels deep.  Here's the code I am having an issue with...  I can't seem to figure out how to get the 3rd level and I'm sure it's something simple I am overlooking.  Thanks in advance!

foreach (RadMenuItem rootitem in menu.RootItems)
            {
                string menuHeader = rootitem.Text;
                Log.WriteLine("The menu header is - " + menuHeader);
                RadMenuItem menuList = menu.FindItemByText(menuHeader);
                foreach (RadMenuItem childitem in menuList.Items)
                {
                    string chldItem = childitem.Text;
                    Log.WriteLine(menuHeader + " - " + chldItem);
                    if (childitem.HasChildren)
                    {
                        int c = childitem.ChildNodes.Count;
                        for (int i = 1; i <= c; i++)
                        {
                            string childChild = ****CAN'T FIGURE THIS CODE OUT****
                            Log.WriteLine(menuHeader + " - " + chldItem + " - " + childChild);
                        }
                    }
  
                }
  
            }





Cathy
Top achievements
Rank 1
 answered on 18 Sep 2012
1 answer
111 views
Hi,
I tried to ran already existing script on telerik visual studio. Also if tried to run the script for single URL for e.g. www.google.com it captures it but after running it gives an error. I cleared all my browser(IE 9) cookies, Cache but its not working. This issue I am getting intermittently.
Stoich
Telerik team
 answered on 15 Sep 2012
1 answer
62 views
Hello All,

Many of my team members want to learn webaii, I don't know if there are any books written on this subject, does anyone know such a book or something similar that could help them.

Thanks in advance,
Aakash
Cody
Telerik team
 answered on 14 Sep 2012
1 answer
87 views
Hello All,

I am clicking an external link using webaii(IE9/WIN7/VisualStudio) which opens a site in a new tab window, but webaii won't shift its focus to the new application, my test checks whether the new app opened is valid using the url.  I tried using examples illustarated in the KB article but no luck yet. Any ideas?

Thanks!
Cody
Telerik team
 answered on 11 Sep 2012
5 answers
314 views
Have an link that will open an modal popup which is html. First thing is that i can't assert if the window is ready via pagetitle which is my first problem. Maybe if i can solve the first problem then maybe that's the time i can access the elements on it.

By the way, the html pop up contains , dropdownlist, okay(image) and cancel(image) which are all clickable.

Need your help.. Can't find any relate problem here that's why i started new thread. I also did read the documentation about the HTML Pop-up which i think it's not the same on mine but did the steps stated there but there's no luck.

Cody
Telerik team
 answered on 11 Sep 2012
3 answers
174 views
Hi folks,

A few days ago i came across the Telerik Testing framework, so i downloaded it and had it installed, having in mind that i will be able to do a UI test on Silverlight. I am using Visual Studio 2010 and i am trying to open this web page : http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html
After this i just want to identify a few components from the Silverlight object and perform a few actions.

So i created a New C# Test Project and added the references to the Telerik framework, wrotw my code and ran the test. The result was that the SilverlightAppsList is gets 1 app, but for some reason it is timed out and i cannot see the SilverlightApp in this list be cause it is not null, but all the members are timed out, as you can see in the screenshot.

What am i doing wrong?

My code looks like this:

using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ArtOfTest.WebAii.Core;
using ArtOfTest.WebAii.TestTemplates;
using ArtOfTest.WebAii.Extensions;
using ArtOfTest.WebAii.Silverlight;
using ArtOfTest.WebAii.Silverlight.UI;
using ArtOfTest.WebAii.Silverlight.Attributes;
using ArtOfTest.Common;
using ArtOfTest.WebAii.Controls.Xaml;
using ArtOfTest.WebAii.Controls.HtmlControls;
 
namespace TestProject7
{
   
    [TestClass]
    public class UnitTest1
    {
        public UnitTest1()
        {         
        }
 
        private TestContext testContextInstance;
 
        
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }
 
        [TestMethod]
        public void TestMethod1()
        {
            Settings mySettings = new Settings();
            mySettings.Web.DefaultBrowser = BrowserType.Chrome;
 
            mySettings.ClientReadyTimeout = 120000;
 
            Manager myManager = new Manager(mySettings);
             
            //must start myManager after creating it
            myManager.Start();
 
            try
            {
                Settings.Current.Web.EnableSilverlight = true;
                mySettings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
                myManager.LaunchNewBrowser();
                myManager.ActiveBrowser.NavigateTo("http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html");
                myManager.ActiveBrowser.WaitUntilReady();
                SilverlightAppsList apps = myManager.ActiveBrowser.SilverlightApps();
 
                SilverlightApp app = apps.ToArray()[0];
 
                string ok = "I am glad if this is executed :)";
            }
            catch (Exception e)
            {
                myManager.Dispose();
            }
 
        }
    }
}
Plamen
Telerik team
 answered on 11 Sep 2012
3 answers
1.0K+ 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
628 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?