Telerik Forums
Testing Framework Forum
1 answer
134 views
As this control does nothing more than wrap IE can it be used as the test browser?
I have tried several methods of having WebAii detect/launch it, but to no avail.

Can this IE control be used as the test browser and if so what is the process?
Thanks in advance for any input.
Anthony
Telerik team
 answered on 11 Jun 2012
4 answers
164 views
Hi,

Do we have an approach to attach an existing IE (or any other browser) instance which is not lunched by WebAii ?  I am using WebAii version 2011.1.609.0. I am not able to find the methods. Could you please share code snippet or work around to attach the existing browser.

Thanks in advance.

Regards,
Siva
Plamen
Telerik team
 answered on 08 Jun 2012
5 answers
146 views
Hi ,

For curios wanted to know if the Telerik testing framework supports Telerik.Web.Mvc?
Since my applicaiton uses Telerik.Web.Mvc controls  and I am auotmating it using telerik framework wanted to know if latest version of telerik framework supports or not..
If not is there any plans to support Telerik.Web.Mvc?

Thansk in Advance,
Mahendra
Plamen
Telerik team
 answered on 04 Jun 2012
5 answers
203 views
When assigning the following table to HTMLTABLE, it is unable to parse the rows.  Therefore the row count is 0 and i am unable to validate the contents.  According to the debugger, it is finding the table, just not parsing the rows.

any help would be appreciated.

Code:
//Find The main Grid
HtmlDiv GridDiv = ActiveBrowser.Find.ById<HtmlDiv>("globalSearchGrid");
//Find The Content
HtmlDiv Content = GridDiv.Find.ByAttributes<HtmlDiv>("class=k-grid-content");
HtmlTable ContenthtmlTable = Content.Find.ByTagIndex<HtmlTable>("table", 0);

Debugger Output:



ContenthtmlTable    {HtmlTable:<table style="height: auto;" id="globalSearchGrid-grid-table" class="k-focusable" cellSpacing="0">} 

HTML:

<
table id="globalSearchGrid-grid-table" cellspacing="0" style="height: auto;" class=
"k-focusable">
  <colgroup>
    <col />
    <col />
    <col />
    <col />
    <col />
  </colgroup>
 
  <tbody>
    <tr>
      <td class=""><input type="checkbox" /></td>
 
      <td><span>Test Matter</span></td>
 
      <td><span>5000000092</span></td>
 
      <td><span>2007-03-22T00:00:00</span></td>
 
      <td><span>Open</span></td>
    </tr>
 
    <tr>
      <td><input type="checkbox" /></td>
 
      <td class=""><span>ITP Budget Matter 2</span></td>
 
      <td><span>5000000023</span></td>
 
      <td><span>2006-04-11T00:00:00</span></td>
 
      <td><span>Open</span></td>
    </tr>
 
    <tr>
      <td><input type="checkbox" /></td>
 
      <td><span>test123123123</span></td>
 
      <td><span>5000000098</span></td>
 
      <td><span>2007-08-20T00:00:00</span></td>
 
      <td><span>Open</span></td>
    </tr>
  </tbody>
</table>
Patrick
Top achievements
Rank 1
 answered on 04 Jun 2012
1 answer
149 views
Hi,

I have a code:
RadGridView usersGrid = app.VisualTree.Find.ByName<RadGridView>("usersGrid");
                Assert.IsNotNull(usersGrid, "users grid not found");
                usersGrid.Wait.For(ag => ag.As<RadGridView>().Rows.Count > 0, timeout, "Rows not found");
                Assert.IsTrue(usersGrid.Rows.Count > 0, "users grid contains 0 rows");
                //double click on randomize row
                usersGrid.Rows[0].User.Click(ArtOfTest.WebAii.Core.MouseClickType.LeftClick, new System.Drawing.Point(10, 10));

                var qwe = usersGrid.SelectedItem;
                var qwe1 = usersGrid.SelectedItem as Models.User;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

"usersGrid" are binding from a List<Models.User>. I want to convert selected row to "Models.User"

In result I have that type of "qwe" = "Models.User", but "qwe1" is NULL.
It's possibly solve this problem ?



Stoich
Telerik team
 answered on 04 Jun 2012
17 answers
193 views
I am in the process of improving the performance of our automation suite against a browser based silverlight application.

One of the major areas that I am unable to work around is getting the Text property of a TextBlock control that is nested inside a data grid.  On average it takes 3/4 of a second to get the value.  This is done thousands of times when the full automation suite is run and it ends up adding 20 - 30 minutes to our test suite just to get a value from a TextBlock control.

The following code is an example of how I am timing reading the TextBlock.Text Property

public string GetCellValue()
{
    string value;
    var textBlock = TableCell.Find.ByType<TextBlock>();
             
    var sw = new System.Diagnostics.Stopwatch();
    sw.Start();
             
    value = textBlock.Text;  //Takes on average 750 milliseconds
             
    sw.Stop();
    Tracer.CaptureTiming( "GetCellValue", sw.Elapsed.Ticks );  //Capturing timing
 
    return value;
}

The TextBlock does not have any nested elements.  Only text.

Is there a more performant way to get the text property of a TextBlock control?  I could really use some advice on this.

Here are some specs of my environment:
WebAII version: Telerik_Testing_Framework_2011_2_1413_FREE_EDITION
OS: Win7 64 bit
Browser: IE 9 32 bit
Test Harness: Nunit
.Net Version: 4.0
Visual Studio Version: 2010 Pro
Ram: 6gb
CPU: 2 Cores @ 2.1 Ghz
Cody
Telerik team
 answered on 01 Jun 2012
1 answer
121 views
Hi

Does the Telerik test framework support running tests in parallel or is that a path with a road block in the end? :)

So far I've come up with this, but it doesn't really work and i can't figure out if it's just not going to work with Telerik or if I'm doing something wrong.

The last test can just be repeated a couple of times and i have DegreeOfParalallism = 2 in AssemblyInfo.cs

I'm in the process of investigating different ways of making our suite run faster, looking forward to your response.

[TestFixture]
    [Parallelizable(TestScope.Descendants)]
    public class TelerikMbUnit1 : BaseTest
    {
        ConcurrentDictionary<string, Browser> browserDict = new ConcurrentDictionary<string, Browser>();
 
        #region [ Setup / TearDown ]
 
        [SetUp]
        public void MyTestInitialize()
        {
            Initialize(false);
 
            // Launch new browser
            Manager.LaunchNewBrowser(BrowserType.FireFox, true);
            Browser browser = Manager.ActiveBrowser;
 
            browserDict.TryAdd(TestContext.CurrentContext.TestStep.ToString(), browser);
        }
 
        [TearDown]
        public void MyTestCleanUp()
        {
    //      this.CleanUp();
 
            Browser browser;
            browserDict.TryRemove(TestContext.CurrentContext.TestStep.ToString(), out browser);
            browser.Close();
        }
 
        [FixtureTearDown]
        public void FixtureCleanup()
        {
            // This will shut down all browsers if
            // recycleBrowser is turned on. Else
            // will do nothing.
            ShutDown();
        }
 
        #endregion
 
        [Test]
        public void SampleWebAiiTest0()
        {
            Browser browser = browserDict.Where(d => d.Key == TestContext.CurrentContext.TestStep.ToString()).Single().Value;
 
            // The active browser
            browser.NavigateTo("http://www.google.dk");
 
            // Find the google search box and set it to "Telerik";
            browser.Find.ByName<HtmlInputText>("q").Text = "Telerik";
 
            // Click the Search button
            browser.Find.ByName<HtmlButton>("btnK").Click();
 
            // Validate the search contain the 'Telerik' text
            Assert.IsTrue(browser.ContainsText("Telerik"));
        }
Anthony
Telerik team
 answered on 01 Jun 2012
1 answer
83 views
Hii,
I am getting time out Exception while navigating to a particular page in Chrome using WebAii.
I am able to navigate to that page in FireFox and IE. I have checked that page is loaded
on time.I have checked using fiddler that no network traffic was going on.
I am using 13.0 version of chrome and latest extension version 2012.1.528.0.
Anthony
Telerik team
 answered on 31 May 2012
5 answers
144 views
Hi

We currently have a suite of UI tests designed using MSTest and Telerik test framework, now we would like to execute them faster, for that I'm looking into Telerik scheduling server, but i can't figure out how and if i can execute my tests inside test studio? Am i missing a way of tagging tests or something to make test studio see the tests?

Or do i have to use the vs2010 plugin to design my tests as *.tstest files before it will work?

Example of a test:     
[Owner("XMNN"), TestMethod]
[TestCategory("LockedScreenEnabled")]
[Description("Tests that an invalid login from masterpage redirets the user to /login")]
public void MasterPageInvalidLoginTest()
    {
        string login = "invalid";
        string pass = "invalid";
        string error = "Combination of login and password was not correct";
 
        ActiveBrowser.NavigateTo("~/");
 
        // Invalid login
        MasterPage masterPage = new MasterPage(this);
        masterPage.LoginFromTopDropdown(login, pass, false, false);
 
        // Check that the login page is shown after invalid login
        LoginPage loginPage = new LoginPage(this,false);
        Assert.AreEqual(login, loginPage.GetUsernameInput().Text, "Incorrect login transfered from Masterpage login to LoginPage");
        Assert.AreEqual(error, loginPage.GetLoginError().InnerText, "Incorrect login error message");
    }
Cody
Telerik team
 answered on 31 May 2012
3 answers
74 views
Hii,
I am not able to get the handle of new modal window ,which i am opening by
clicking some button. Window gets opened but browser count is not increasing.
Its working for non modal html windows .ANY HELP
?????
Anthony
Telerik team
 answered on 30 May 2012
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?