Telerik Forums
Testing Framework Forum
12 answers
791 views
Currently using a while loop to check for a variable to not be null and using thread.sleep(250) to wait after checking if it is.  Cannot find a better way to do this, does anyone have any ideas?

[CodedStep(@"Find and click on course link")]
  public void FindAndClickOnCourseLink()
  {
                  string textContent = ((string)(System.Convert.ChangeType(Data["CourseName"], typeof(string))));       
        
                  HtmlAnchor expectedLink = null;
       
                  var attempts = 0;
       
                  while (expectedLink == null)
                  {
                      var rows = Find
                          .ById("activitiesTable")
                          .As<HtmlTable>()
                          .AllRows;
       
                      expectedLink = rows
                          .Select(row => row.Cells[0].Find.AllByContent<HtmlAnchor>(textContent).FirstOrDefault())
                          .Where(a => a != null)
                          .FirstOrDefault();
       
                      attempts++;
                       
                      //TODO: This is not very elegant but it works, needs something better.
 
                      if (attempts > 20)
                      {
                          break;
                      }
       
                      System.Threading.Thread.Sleep(250);
                  }
       
                  expectedLink.Click();
              }
  }
Cody
Telerik team
 answered on 20 Mar 2012
1 answer
123 views
i have a recorded test for Sliverlight application (clicking by  menu item ,surfing on sub-menu ).time after time application shows modal dialog window with button "Save" and "Discard" , for example, there is autosaving or data was changed by another user.And test is stucking on this stage, application is waiting for confirmation.how i can close showing dialog windows after every step, or clicking "SAve" at this dialog?
Anthony
Telerik team
 answered on 20 Mar 2012
1 answer
145 views
i want to easily loop all test , 120 steps. drag and drop 120 steps on loop step is not so easy, and often order of steps occaionally changing into loop (maybe, hand of tremoring once) .how i can perform loop correct? in code manually, for example?
Anthony
Telerik team
 answered on 20 Mar 2012
1 answer
82 views
i want  to make toggle annotaions be always on, how i can reach it? i`m tired manually enable annotaions every hour.
Ivaylo
Telerik team
 answered on 19 Mar 2012
3 answers
123 views
System.Windows.FrameworkElement class has a property called Tag (of type object).  It seems this is not exposed in ArtOfTest.WebAii.Silverlight.FrameworkElement class.  Is there a way to access the value of this property from the Telerik Testing Framework?

Thanks
Cody
Telerik team
 answered on 19 Mar 2012
2 answers
110 views

This is an enhancement request.

Is there a way to disable/filter out user mouse actions while a WebAii test is running?
This is useful in 2 situations:
  1) demos using WebAii
  2) running tests and working at the PC ( essentially giving the tests priority of mouse input,
     while the user can still use the keyboard )

Sample code:
    ...
    Manager.Desktop.ignoreUserMouse();
    runTest(); // allows test to run without user actions accidentally derailing the test
    Manager.Desktop.acceptUserMouse();

I've not addressed what happens when the test crashes, and the acceptUserMouse is not called.

Currently, I turn my mouse upside down to prevent user (my) interference.
kwee
Top achievements
Rank 1
 answered on 18 Mar 2012
3 answers
155 views

Hi,

I am using WebAii 2011.2.928.
What version of Firefox is supported for Silverlight?

I used the HealthCareDemo test that comes in the sample directory. Both FF 3.6, FF 4.0 and FF5.0
failed, even if their respective addons are installed.

   || FF            || AddOn                                                                               || Result ||
   | Firefox 3.6 | Telerik Testing Framework - Firefox 3 + Client 2011.1.0.0 | Failed |
   | Firefox 4    | Telerik Testing Framework - Firefox 4 + Client 2011.1.0.0 | Failed |
   | Firefox 5    | Telerik Testing Framework - Firefox 4 + Client 2011.1.0.0 | Failed |

Specifically, the test runs and the website http://pjd.mscui.net/PrimaryCareAdmin.htm
loads, but no actions occur. When I set the active browser to IE 7, the test runs.

Q1) Does the AddOn name suggest that there is no addon for client 2011.2?

I'm using Firefox 3 and 4 because of the names of the clients in the AddOns.
Q2) Can I upgrade to the latest Firefox version, 11?

Thanks,

kwee
Top achievements
Rank 1
 answered on 16 Mar 2012
1 answer
179 views
Hi,

Telerik_Testing_Framework_2011_2_1413_FREE_EDITION.msi unable to launch Safari. Looks like the same issue with FireFox10

Is there anyone else having this issue?
Ivaylo
Telerik team
 answered on 15 Mar 2012
2 answers
113 views
Hello.
I'm trying to write a simple test for a Chrome plugin.
I'm running Win7 x64, VS2010, with latest version of Telerik Testing Framework(2011.2).

Everything works fine when I'm trying to access a normal(http://) url, but fails when calling NavigateTo on a "file:///" url.
It just hangs on the "Preparing browser for automation..." page, and doesn't budge from there.
The same code works with Internet explorer.

Here's my test code:
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using ArtOfTest.WebAii.Core;
using Microsoft.VisualStudio.TestTools.UnitTesting;
 
namespace ChromeTests
{
    [TestClass]
    public class ShowForm
    {
        private Settings testSettings;
        private Manager testManager;
 
        [TestInitialize]
        public void Init()
        {
            testSettings = new Settings()
                               {
                                   Web =
                                       {
                                           Browser = BrowserExecutionType.Chrome // works fine if changed to InternetExplorer
                                       },
                                       LogLocation = @"c:\testLog.txt"
                               };
            testManager = new Manager(testSettings);
            testManager.Start();
            testManager.LaunchNewBrowser();
        }
 
        [TestCleanup]
        public void Cleanup()
        {
            testManager.Dispose();
        }
 
        [TestMethod]
        public void Local()
        {
// works fine if changed to "http://www.google.com"
            testManager.ActiveBrowser.NavigateTo("file:///D:/TFS/ChromeToolbar/ChromeTests/bin/Debug/TestForms/sample1.htm"); 
            var tdNum = testManager.ActiveBrowser.Find.ById("tdNum");
            Assert.IsNotNull(tdNum);
            Assert.AreEqual("1", tdNum.InnerText);
        }
    }
}
Thanks for any help!
Mihael Zak
Top achievements
Rank 1
 answered on 14 Mar 2012
10 answers
134 views
Hi,

All of my automation is failing on Firefox 8 with the following error: 
"(FireFox): ArtOfTest.WebAii.Exceptions.FindException : Find Details:
- FindParam used: [Find logic: Use 'AttributesOnly' where (name=email) ]
- Start Element: [Element: '#comment#:-1']

  ----> System.ArgumentException : Start reference has to be a valid element and not an EndTag
Parameter name: Reference"

These same tests pass on IE 9. I followed all the instructions at http://www.telerik.com/automated-testing-tools/community/forums/test-studio-express/automation-framework/findexception-in-ie.aspx, but the failure still repros for me on Firefox 8. Please help!

Configuration:
Win7 x64
VS10
Nunit (x86)
Latest Webaii .dlls
Firefox 8 

Thanks,
Chris
Ivaylo
Telerik team
 answered on 13 Mar 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?