Telerik Forums
Testing Framework Forum
3 answers
116 views
How to send email from telerik test studio ?
Boyan Boev
Telerik team
 answered on 12 Nov 2014
1 answer
107 views
Hi Team,

I have a suit of 200+ test cases. So, after performing full suit execution I need to re run all the failed test cases immediately in order to make sure the failures are constantly failing or not. Is there any option for my requirement?

This saves a lot of time and effort for us.

Awaiting needful reply. 

Regards,
Avinash
Daniel Djambov
Telerik team
 answered on 11 Nov 2014
1 answer
130 views
Hi,

I am trying to loop through a collection of button objects in a SilverLight web page (there are 175 button objects) to find a button that has the text value = 'Airport". But I do not know how to get to the text property using WebAii (C#). Please could somebody help. Below is the code I have put together. The '????' parts are were I am stuck. Also, I am unsure of how to actually double click the element when I have found the one I am looking for, so if you could here here to it would be most appreciated.

var buttons2 =_silverlightApp.Find.AllByType<TextBlock>();
           
for (int i = 0; i < buttons2.Count+ 1; i++)
           
{
         
    if(buttons2.??????.text = "Airport")
     {
                 int elementNum = i;
                 ??????.LeftDoubleClick;
     }      

}
Cody
Telerik team
 answered on 07 Nov 2014
3 answers
178 views
When i try to get combobox Text appears exception:
 
ArtOfTest.Common.Exceptions.FindElementException : Unable to find the specified element: Unable to find the element of type: textblock
at ArtOfTest.WebAii.Silverlight.SilverlightProxy.ExecuteSLCommand(SilverlightCommand cmd)
at ArtOfTest.WebAii.Silverlight.SilverlightProxy.GetProperty(AutomationProperty property, IAutomationPeer peer)
at ArtOfTest.WebAii.Silverlight.AutomationObject`1.GetProperty(AutomationProperty property)
at ArtOfTest.WebAii.Silverlight.UI.TextBlock.get_Text()
at ArtOfTest.WebAii.Silverlight.FrameworkElement.get_Text()

if (!box.Text.Equals(value)) // <- Here appears exception
           {
               box.OpenDropDown(false);
               box.Refresh();
               ComboBoxItem item = box.Items.FirstOrDefault(i => i.Text.Trim().Contains(value.TrimValue()));
               Stopwatch watch = Stopwatch.StartNew();
               while (item == null && watch.ElapsedMilliseconds < 30000)
               {
                   box.Refresh();
                   item = box.Items.FirstOrDefault(i => i.Text.Trim().Contains(value.TrimValue()));
               }
               watch.Stop();
 
               if (item != null)
               {
 
                   item.IsSelected = true;
                   box.IsDropDownOpen = false;
                   return true;
               }
 
               box.IsDropDownOpen = false;
               return false;
           }
           return true;

Boyan Boev
Telerik team
 answered on 07 Nov 2014
1 answer
129 views
Hi,
I'm trying to download a file that is generated from our site and when the "download file" prompt appears, telerik used to click on the dialog with the actual mouse cursor which would click on the Save As button.  This no longer happens.  If I help the test along and click on the Save As button in the download prompt, the Save As dialog comes up and I see that the file path is then entered into the dialog by the test.  From there it seems to move on correctly.  This used to work for us, but randomly just stopped for some reason.  Here's the code that I'm running:

DownloadDialogsHandler saveDialog = new DownloadDialogsHandler(browserWindow, DialogButton.SAVE, pathToFile + fileName, manager.Desktop);

manager.DialogMonitor.Start();

Logging.DocumentStepLevel("Click the button to export the report/file.");
ClickElement(browserWindow, xPathOfBrowseButton, true);

saveDialog.WaitUntilHandled(45 * 1000);



Computer Info:
Windows 7
Internet Explorer 10
Boyan Boev
Telerik team
 answered on 06 Nov 2014
4 answers
364 views
Hello!!!
 I am trying to do feasibility analysis using Test studio.Can anyone let me know how can we achieve parameterization or data driven from an external file.
2.Can we perform descriptive programming using test studio. for example i have dynamic objects that are populated on the application then
 can i write a driver and store all these elements in a seperate file such as excel and then basing on the requirement can i pass this elemnet as an arguement and perform the operation. If Yes please provide the process as my application has lots of dynamic objects.

3.How can i write my own code instead of recording.
4.Where can i find all the methods with which i can write my own code.(An exampke with code would be helpful)
5.How  can i create reusable functions and call them in my script.All these are application specific reusables such as login.
6.How can pass the test data to my variables within a script.


I am very much in need of all these .Your help in this regard would be highly appreciated.

Boyan Boev
Telerik team
 answered on 30 Oct 2014
1 answer
134 views
Hi, I want to click the control with type "RadButton":

string apppath = @"VisualDesigner.StandaloneApplication.exe";
WpfApplication wpfApp = Manager.LaunchNewApplication(apppath);                           
            
var xpathFieldEditor = wpfApp.MainWindow.Find.ByAutomationId("XPath _FieldEditor");
var editBtn = xpathFieldEditor.Find.ByType("RadButton");

editBtn.User.Click();


And for "editBtn.User.Click();" I recieve the following exception for  - "An exception of type 'ArtOfTest.Common.Exceptions.FindElementException' occurred in ArtOfTest.WebAii.dll but was not handled in user code. Additional information: Unable to find the specified element: Unable to find the element of type: radbutton".

Are there any methods to click this button?
Boyan Boev
Telerik team
 answered on 27 Oct 2014
3 answers
89 views
I need to disable the lovely Chrome Print Preview, and it appears the only way to do it is to call "Chrome.exe --disable-print-preview" but since you guys are calling chrome.exe, and the overload of LaunchNewBrowser with which you can pass arguments doesn't actually pass the arguments - have you a better way to shut this dumb chrome feature off? 
Boyan Boev
Telerik team
 answered on 14 Oct 2014
14 answers
238 views
Is there any way to run JQuery scripts with TTF?
Something like browser.actions.invokeScript("JQUERY STATEMENT HERE");
Steve
Top achievements
Rank 1
 answered on 09 Oct 2014
7 answers
190 views
Hello there!

I have been having difficulty clicking on this button for some reason. I just can't figure it out.
I can get the button with  -    Element updateBtn = iFrame.Find.ById("btnUpdateResult"); The id makes that part easy enough.

But clicking on it doesn't do anything! I've tried Actions.Click, as well as Actions.invokeEvent(updateBtn, ScriptEventType.OnClick), as well as OnSubmit.


This is what the element looks like in the browser.
<input name="btnUpdateResult" value="Update Result" id="btnUpdateResult" class="eqdax-resultPanel-updateButton" type="submit">

Cody
Telerik team
 answered on 06 Oct 2014
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?