Telerik Forums
Testing Framework Forum
10 answers
150 views
Hi

We are trying to access the document object through WebAii c# code, that is in a unit test case.
we want to get the collection of images through the document object. We have a javascript library for webtrends that inserts images as external files. This is present in the document.images collection...but is not seen in the html source.

What is the code to see that the image exists, so that we know for sure that a webtrend call happens.

Thanks
Rad.
Lee
Top achievements
Rank 1
 answered on 21 Jan 2014
1 answer
75 views
Hi,
I am using Testing Framework Telerik_Testing_Framework._2013_2_1210_Free_Edition.
I am installing telerik framework in machine-A and then I am trying to refer the same Dll's in another machine-B without installing the framework in machine B but I am not able to do so.
Due to portability issue, I wanted to refer the same dll's without installing testing framework in different machines. Is there a way I can do this?
Boyan Boev
Telerik team
 answered on 17 Jan 2014
4 answers
120 views
Hi, I am start using Telerik Test Framework and face out with next case:
- How can I execute my Test under different version of Firefox ? For example, I have Firefox  4, 5, 6 installed on my machine and for our client it's important to run Test under all Firefox version.

So, how can I specify exact version of Firefox to be launched ? Currently it's launch the newest version (e.g. Firefox 6).

Thanks.
Boyan Boev
Telerik team
 answered on 15 Jan 2014
1 answer
101 views
Framework version used: 2013.2.1210.0

so we have a class that inherits from the RadColorPicker as per below
public class VisualColourPicker : RadColorPicker
{
}
which we use to get to the VisualColourPicker.SelectedColor property to find the ...well the selected colour.
This however throws an error at the moment with an Element Not found exception using the FindExpression [name 'Exact' LeftButton]
using snoop I have determined that the button that is in fact trying to be located is called "ButtonPart". So i have written my Property code as follows to get around this on my class I mentioned above...
public ArtOfTest.WebAii.Controls.Xaml.Wpf.Color CustomSelectedColor
{
    get
    {
        var but = this.Find.ByName<ArtOfTest.WebAii.Controls.Xaml.Wpf.Button>("ButtonPart");
        var rec = but.Find.ByType<ArtOfTest.WebAii.Silverlight.UI.Rectangle>();
        return (rec.Fill as ArtOfTest.WebAii.Silverlight.UI.SolidColorBrush).Color;
    }
}
This however now gives me. An error of "Unable to cast object of type 'ArtOfTest.WebAii.Controls.Xaml.Wpf.SolidColorBrush' to type 'ArtOfTest.WebAii.Silverlight.UI.Brush'." So I had to change my property code above to the following to get the selected colour.
var but = this.Find.ByName<ArtOfTest.WebAii.Controls.Xaml.Wpf.Button>("ButtonPart");
var rec = but.Find.ByType<ArtOfTest.WebAii.Silverlight.UI.Rectangle>();
var fill = (ArtOfTest.WebAii.Controls.Xaml.Wpf.SolidColorBrush)rec.GetProperty(new ArtOfTest.WebAii.Silverlight.AutomationProperty("Fill", typeof(ArtOfTest.WebAii.Controls.Xaml.Wpf.SolidColorBrush)));
return fill.Color;
Is there a reason why 1: simply VisualColourPicker.SelectedColor does not work out of the box in that its looking for some "LeftButton"
2: When I try and get the colour with myown property that the out of box Fill property then fails in an internal cast. Thanks
Boyan Boev
Telerik team
 answered on 07 Jan 2014
3 answers
143 views
Hello:
       I have scenario where we have to enter username,password and then click on Login button.But unfortunately after the username is set and the password is set the login button is not enabled,however it is working fine if we are manually entering the text.Can you please let us know if there is a way where we can enter the text character by character to get the login button enabled.

Regards,
Naga
Velin Koychev
Telerik team
 answered on 07 Jan 2014
5 answers
185 views
My team has recently upgraded to Visual Studio 2013 and the 2013.1 build of the Testing Framework did work with VS 2013.  However, several of my team members upgraded to the 2013.2 Testing Framework release, and their tests are no longer recognized by the VS Test Launcher.  They have tried to go back to the previous build (2013.1) but that download is no longer available.  Can prior builds of the testing framework be downloaded?  If not, several of my team members will be unable to work until the bug is fixed.

Thanks,

Sophia
Boyan Boev
Telerik team
 answered on 07 Jan 2014
11 answers
128 views
Is there any way we can run our code with out launching the browser each time we debug our code, this is the problem if we are debugging certain code in middle and we need to run the whole code.What I mean to say is tht is there any way where we can capture all the browser instances on desktop and then compare the required browser title with our string and then work on that browser instead launching a new instance,
Just a thought to improve our debugging response time, please suggest on this, thanks!
Cody
Telerik team
 answered on 02 Jan 2014
5 answers
144 views

Unable to download the excel file from 'Download Dialog' in IE

Please find below code and also please find attached screen shot for the dialog box.
My System Configuration: VSTS 2012, Telerik Test Framework( Nunit template) ,Window7 and IE9.

namespace TestProject2

{

public class TelerikNUnitTest1 : BaseTest

    {

public void SampleWebAiiTest()

        {

Manager.LaunchNewBrowser(BrowserType.InternetExplorer);

ActiveBrowser.NavigateTo("http://192.168.10.65/Login.aspx");

string saveLocation = string.Format("address-{0:HH-mm-ss}.xls", DateTime.Now);

            //Create dialogs

IEDownloadDialog part1 = new IEDownloadDialog(ActiveBrowser, DialogButton.SAVE, Manager.Desktop);

Manager.DialogMonitor.Start();

SaveAsDialog part2 = SaveAsDialog.CreateSaveAsDialog(ActiveBrowser, DialogButton.SAVE, @"C:\Users\1029\Desktop\ExportTest" + saveLocation, Manager.Desktop);

IEDownloadCompleteDialog part3 = new IEDownloadCompleteDialog(ActiveBrowser, DialogButton.CLOSE, Manager.Desktop);

            //Add each dialog to the monitor

            Manager.DialogMonitor.AddDialog(part1);

            Manager.DialogMonitor.AddDialog(part2);

            Manager.DialogMonitor.AddDialog(part3);

            System.Threading.Thread.Sleep(30000);

            Manager.ActiveBrowser.RefreshDomTree();

           

  //Clicking on below button ‘Save Dialog’ will open         
Find.ById<HtmlInputImage("ctl00_ctl00_PageContentPlaceHolder_PageContentPlaceHolder_TrademarkSearchSearchResults_ExportExcelButton").Click();

            Manager.ActiveBrowser.RefreshDomTree();

            ActiveBrowser.WaitUntilReady();

           

            part1.WaitUntilHandled();

            part2.WaitUntilHandled(30000);

            part3.WaitUntilHandled(30000);

            System.Threading.Thread.Sleep(10000);

            System.Threading.Thread.Sleep(10000);

        }

    }

}

I am getting below exception in debug mode for'part1.WaitUntilHandled();' code line

‘Time Out Exception was unhandled by user code. Time Out waiting ‘60000’ msec. for any dialog to be handled.
And In Run mode below trace is observed

[Trace] : Unexpected dialog encountered. Closing the dialog, and halting execution.

Please help me how to save excel file from IE9 download dialog and also please find attached screen shot for dialog box.


Mario
Telerik team
 answered on 26 Dec 2013
9 answers
1.0K+ views
I am using Testing Framework Telerik_Testing_Framework_2011_2_928_FREE_EDITION with c# for chrome browser.
When i click some thing on the page to navigate to other page it is taking longer time to load the page.
Is there any method is to wait until the page is loaded ? and do the next steps..
_WebAiiBrowser.IsReady() -->is not working

  Manager _MyManager = null;
            Browser _WebAiiBrowser = null;
            string str = "";
            ArtOfTest.WebAii.Core.Settings aSettings = new ArtOfTest.WebAii.Core.Settings(new Settings.WebSettings(BrowserType.Chrome ));
            _MyManager = new Manager(aSettings);
            _MyManager.Start();

            _MyManager.LaunchNewBrowser();
            _WebAiiBrowser = _MyManager.ActiveBrowser;
 
            // Navigate to a certain web page
           _WebAiiBrowser.NavigateTo("http://www.yahoo.com");
           try
           {
               str = _WebAiiBrowser.Find.ByTagIndex("body", 0).InnerMarkup;
               str=_WebAiiBrowser.ViewSourceString;
               _WebAiiBrowser.IsReady ();
str=_WebAiiBrowser.ViewSourceString; // this line is hitting before the page renders..

Cody
Telerik team
 answered on 26 Dec 2013
6 answers
201 views
I am new to Test Framework so would appreciate a gentle introduction to working with TreeView control. I find it, do an initial click on it to expand it to it's "first level" of nodes but I then need to select the little "node arrow" next to the item in the TreeView to open up the "second level" of items in the TreeView. It's this "second click" on the little "arrow" icon next to the TreeViewItem in the TreeView control that I have to click... not sure how to do this. Any feedback is appreciated. I don't know if I have to get the *exact* x/y coordinates of that arrow next to the Item and do a User.Click(with x/y coordinates or whatever the API specifies) or if I can just set focus on a TreeViewItem and simulate the Click event on that TreeViewItem itself. Again, kinda lost so any help is appreciated.

By the way I have to write code to do this as I only have the Test Framework free edition available to me. 

Thanks!

Jess
Boyan Boev
Telerik team
 answered on 23 Dec 2013
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?