Telerik Forums
Testing Framework Forum
3 answers
140 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
106 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
300 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
120 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
55 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
204 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
159 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
1 answer
78 views
Hello,

I'm in need of a solution for capturing an entire webpage using WEBAII/TEST STUDIO. I've seen other solutions online using third party sites and other methods. But, I'd like to keep my tool consistent, using webaii and/or test studio.

So far the only method I've found is...

Log.CaptureBrowser(ActiveBrowser);

And this doesn't suffice because it only captures what the activebrowser displays.
Boyan Boev
Telerik team
 answered on 02 Oct 2014
1 answer
69 views
Hi All,

We are using Telerik testing framework to test our Silverlight application.
Unfortunately we are unable to find a solution to access elements inside a popup.

Please see attached screen shot of Silverlight spy, which explains our situation.

Looking for a help from you guys.

Thanks in advance,
Ruwan
Ivaylo
Telerik team
 answered on 02 Oct 2014
3 answers
64 views
Hello guys
Please Help if anyone faced the same issue after latest Framework update from September 3rd

Here is the thing:
When I launch tests (which previously run OK) on IE10 it just opens Internet Explorer and waits ForBrowserToConnect but fails in a while. Browser remains open but test execution fails with following 'explanation':

SetUp : System.TimeoutException : Wait for condition has timed out
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.

   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
   at ArtOfTest.WebAii.Core.Manager.WaitForBrowserToConnect(Int32 browserIndexToWaitFor)
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle)

Boyan Boev
Telerik team
 answered on 02 Oct 2014
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?