Telerik Forums
Testing Framework Forum
5 answers
212 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
239 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
3 answers
155 views

This is very urgent please!!

Please find attached my coding for messagebox. The first message is displayed correctly but the second message is not is dispayed. I don't want to close myManage. myManage.Displose(); How to make the send and third message appear. Even this code doesn't work

 

NativeWindow window = new NativeWindow();

window.AssignHandle(myManager.ActiveBrowser.Window.Handle);

 

 

MessageBox.Show(window, "This is a message!");

 

 

Velin Koychev
Telerik team
 answered on 20 Dec 2013
2 answers
110 views
How can i find kendolistviewitem from kendolistview?
Manjunath
Top achievements
Rank 1
 answered on 20 Dec 2013
3 answers
87 views
Hi,

Please list the new features and enhancements added to the December, 2013 release of Telerik Testing Framework. I didn't see any blog or thread covering this topic.

Thanks in advance,
Giri
Giri
Top achievements
Rank 1
 answered on 19 Dec 2013
3 answers
174 views
I have an HTML page where I have three fields to enter the following values​​:
Manufactures Suggested Value, Suggested Value and Value Sales Association, these three field are using "NumericTextBox".

With this script:
'KendoInput textboxVSAssociacao = ActiveBrowser.Find.ByExpression <KendoInput> ("class = k-k-NumericTextBox widget");
                 textboxVSAssociacao.TypeText ("8500");'

I can put the value in the first field but can not in demics, because the other values ​​will be reported in the first field. How do I proceed to inform the value in each field?
Boyan Boev
Telerik team
 answered on 16 Dec 2013
2 answers
105 views
I can test my Silverlight app fine using Test Studio, but when I try to write a custom NUnit test, I always get one type of error or another (Pipe Null State: False, NullReferenceException, etc.).

I was wondering if there is an example of a custom NUnit test that tests a Silverlight app, that I can run without Test Studio?

Thanks for your help.
Chery
Top achievements
Rank 1
 answered on 11 Dec 2013
3 answers
142 views
Hi,

After updating WPF controls (from 2013.2.0611 to 2013.3.1016) tooltips for RadRibbonButtons are incorrectly shown in UISpy (and recognized in White framework).
For 2013.2.0611, the HelpText property shows correct tooltip, i.e. the same as set in ToolTip property.
For version 2013.3.1016, HelpText shows "RadRibbonButton" ignoring currently set ToolTip value.

Tooltips are correctly displayed in application UI and the problem concerns only test automation.
Is it expected behavior or there is another way of getting actual tooltip values for RadRibbonButtons?

Regards,
Lukasz
Boyan Boev
Telerik team
 answered on 06 Dec 2013
5 answers
239 views
Hi,
I am using the mouseclick to click a button. However, the mouse cannot move to the top of the button. I also tried the Actions.click, mouse left click, mouse leftdoubleclick, none of them can work. But If I click the button manually, this button can work well and the dialog can be closed successfully. See my code and screenshot. Actually, this issue doesn't happen with mouse click for other buttons.

HtmlFindExpression htmlFindExpress = new HtmlFindExpression("id=popup_panel");
ActiveBrowser.WaitForElement(htmlFindExpress, 5000, false);
Find.ById<HtmlInputButton>("popup_ok").MouseClick();
Boyan Boev
Telerik team
 answered on 05 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?