Telerik Forums
Testing Framework Forum
3 answers
149 views

   Hi,

    I am using Telerik Test Studio and writing about 20 tests for one of the e-commerce projects at work. I am learning as I go and   need some insight into how to do validation on source code within a page.

I am writing a test for a checkout process from initial product selection, basket, login, address etc right down to the confirmation page.

On the source of the confirmation page, I need to validate :

 1. Google Analytics tracking code for successful order
 2. Affiliate marketing tracking code
 3. Multivariate testing tool tracking code.

 Is there a way I can get Telerik to look at the source code of a page for the validation steps?

 Please respond urgently.

 Many thanks

Cody
Telerik team
 answered on 20 Sep 2012
2 answers
155 views
Hello Telerik Team,

I try to access an element from our application (not accessible outside the company sorry) with a XamlFindExpression and it doesn't work when some of the controls types are "proprietary". It always returns an error.

I use:
Dim SecondElement As TextBlock
SecondElement = SilverLightMain.appMain.Find.ByExpression(New XamlFindExpression("Name=FunctionScriptView","|","XamlPath=/Grid[0]/Border[1]/Grid[0]/Grid[0]/ScrollViewer[0]/Border[0]/Grid[0]/ScrollContentPresenter[0]/Border[0]/DEXWebv2.FunctionEditor.Views.Functions.DateLastDayOfMonthView[0]/Grid[0]/DEXWebv2.FunctionEditor.Views.Functions.FunctionParamControl[0]/ContentPresenter[0]/Grid[0]/Border[0]/TextBlock[0]")).[As](Of TextBlock)()

Is there a way to have the XamlFindExpression to work in this case?

Thank you.
test cdb
Top achievements
Rank 1
 answered on 19 Sep 2012
1 answer
179 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
120 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
117 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
126 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
76 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
101 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
341 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
188 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
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?