Telerik Forums
Testing Framework Forum
4 answers
92 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
97 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
90 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
51 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
75 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
282 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
154 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
939 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
513 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
122 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
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?