Telerik Forums
Testing Framework Forum
1 answer
145 views
Hi.
I have problem. I designed test and I need emulation mouse work (DoubleClick and mouse wheel).

For DoubleClick I write 
Pages.T360CrossBrowserTest.EtTextAreaTextArea.MouseClick(MouseClickType.LeftDoubleClick);
and it is fine work.

But when I write 
Pages.T360CrossBrowserTest.EtTextAreaTextArea.MouseClick(MouseClickType.Wheel);
it is don't work.
Anthony
Telerik team
 answered on 03 Jul 2012
2 answers
167 views
Hello,

Working on the UI Testing, I'm wondering how would I get text/value from a already selected RadComboBox.
Thanks for reading - Joe

[TestMethod]
public void SampleWebAiiTest()
{
    Settings.Current.Web.EnableSilverlight = true;
    Manager.LaunchNewBrowser();
    ActiveBrowser.NavigateTo("http://demos.telerik.com/silverlight/#ComboBox/FirstLook");
    SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
 
    Telerik.WebAii.Controls.Xaml.RadComboBox cb = app.Find.ByAutomationId<Telerik.WebAii.Controls.Xaml.RadComboBox>("TechnologySelection");
    Assert.IsNotNull(cb);
    cb.SelectItem("Silverlight", true);
    Assert.AreEqual("Silverlight", cb.Text); // Not working, Expected <Silverlight>, Actual <>
 
    System.Threading.Thread.Sleep(1000);
}
Joe
Top achievements
Rank 1
 answered on 03 Jul 2012
1 answer
324 views
Hello Pls give an example to work with Kendo Numeric text box as i am hanged up without slecting a value.
Plamen
Telerik team
 answered on 03 Jul 2012
2 answers
165 views
Hello,

I want to click on a RadTabItem in my automation, but have no idea how to go about doing this.

<!--Manufacturer Tab-->
           <telerik:RadTabItem DropDownContent="Manufacturers" Header="Manufacturers" FontSize="14" Background="Transparent" Padding="20,0,20,0">
               <telerik:RadTabItem.Content>
               .
               .
               .                    
               .                        
               </telerik:RadTabItem.Content>
           </telerik:RadTabItem>
Joe
Top achievements
Rank 1
 answered on 03 Jul 2012
4 answers
272 views
Hello,

I'm using the Telerik Testing Framework to do UI Automation within a Silverlight application.
I was wondering how I can automate a user selecting an item from a RadControlBox in a programmatic manner.

Thanks, Joe
[TestMethod]
public void UIChecks ()
{
    _RadComboBox CB_Boundary = myApp.FindName<RadComboBox>("CB_Boundary");
    Assert.IsNotNull(CB_Boundary);
      
    Sleep(1);
    // Don't know how to click on RadComboBoxItems, this maybe?
    CB_Boundary.User.Click();
     
    //ArgumentException
    //ComboBox contains no items to search in and select! Please make sure the test case opens
    CB_Boundary.SelectItem("Boundry", true);
    //Select Boundry Item
    Sleep(1);
}
Joe
Top achievements
Rank 1
 answered on 29 Jun 2012
2 answers
148 views
Hi,
I am facing below mentioned issue:
Recording: Html Window-->Click on button->Opens a window->Select Content and click on Ok button which causes the window to close automatically->Click on another button
Playing this recording: Html Window-->Click on button->Opens a window->Select Content and click on Ok button ->Window closes automatically->Click on another button(Fails to identify) 

Thanks,
Deepak

Deepak
Top achievements
Rank 1
 answered on 28 Jun 2012
1 answer
144 views
Hi there,

I am trying to determine if a Silverlight RadWindow has been opened.  How do I go about this in using Telerik Test Studio Express?

Best
Anthony
Telerik team
 answered on 27 Jun 2012
0 answers
129 views
Hello,

I'm trying to set the Find Strategy to return null to check if a popup window pops up when a user do a certain action. It works for the Navigating to "http://localhost:1314/MSP/default.aspx#lul" alone, but when I test the btnMap click, I get a null reference exception.

Thanks - Joe

UPDATE: I just caught the exception and work my way around it, no more problems!

[TestMethod()]
public void CheckAllTabs()
{
 
     
    //Elements
    _HyperlinkButton btnMap = myApp.FindName<HyperlinkButton>("btnMap");
 
 
  
    System.Threading.Thread.Sleep(3500);
    btnMap.User.Click();
    System.Threading.Thread.Sleep(3500);
    TestErrorPage();
 
    System.Threading.Thread.Sleep(3500);
    myManager.ActiveBrowser.NavigateTo("http://localhost:1314/MSP/default.aspx#lul");
    System.Threading.Thread.Sleep(3500);
    TestErrorPage();
 
}
 
//Checks for popup error Message
public void TestErrorPage()
{
    FindStrategy originalStrategy = myApp.Popups.FirstOrDefault().VisualTree.Find.Strategy;
    try
    {
        myApp.RefreshVisualTrees();
        System.Threading.Thread.Sleep(3500);
 
        //null reference exception occurs
        myApp.Popups.FirstOrDefault().VisualTree.Find.Strategy = FindStrategy.WhenNotVisibleReturnNull;
 
        Button OKButton = myApp.Popups.FirstOrDefault().VisualTree.Find.ByName<Button>("OKButton");
        Assert.IsNull(OKButton);
    }
 
    finally
    {
        myApp.Popups.FirstOrDefault().VisualTree.Find.Strategy = originalStrategy;
    }
 
}
Joe
Top achievements
Rank 1
 asked on 27 Jun 2012
6 answers
776 views
Hi Guys, 

Could you please advice if Webaii 2.0 APIs support some form of Bitmap comparison ? 

ta,
SD.
Stoich
Telerik team
 answered on 25 Jun 2012
2 answers
182 views
Hi all,

I'm trying to close some slide outs and in page pop ups when they show (they only show after cookies are cleared when you first visit this page)

I've tried a few things but i'm not getting the results i need. Examples i've found use .isVisible which i couldnt find in my available options.<div class="popup-modal most-visible" style="display: block; z-index: 102; width: auto; height: auto; top: 159px; left: 680px;">
Here are the 2 snippets of code i want to verify if they are "showing on the page currently"

<div class="popup-modal most-visible" style="display: block; z-index: 102; width: auto; height: auto; top: 159px; left: 680px;">
<div class="qsc-popup-dialog" style="display: block; visibility: visible;">
<div class="close-button" title="Close Dialog"></div>
<div class="header">Product Type</div>
<div id="startupHelp" class="body" style="width: auto; height: auto; overflow: auto;">
<div class="footer">
</div>
</div>
 
 
<div class="sf-pagehelp" style="left: 0px;">
<a class="sf-pagehelp-pin" href="#" style="display: none;"></a>
<div class="sf-pagehelp-hdr">
<h3>Page Help</h3>
<div class="sf-pagehelp-subtext">Quick answers for the current page.</div>
</div>
<div class="sf-pagehelp-wrap">
<div class="sf-pagehelp-toggle"></div>
</div>


I think i'm having issues because the code will always be in the source so what i'm trying now will never be false...

browser.RefreshDomTree();
            //if help is open close it.
            if (browser.Find.ById("sf-pagehelp") != null)
            {
                browser.Actions.Click(browser.Find.ById("sf-pagehelp-toggle"));
            }
            else if (browser.Find.ByXPath("/html/body/div[3]/div/div[4]/div/span/a/span/span/input") != null)
            {
                browser.Actions.Click(browser.Find.ByXPath("/html/body/div[3]/div/div[4]/div/span/a/span/span/input"));
            }

any help is appreciated.

thanks!
Anthony
Telerik team
 answered on 19 Jun 2012
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?