Telerik Forums
Test Studio Forum
5 answers
132 views
Hi Guys

I was wondering if the ActiveBrowser.ClearCache(BrowserCacheType.History) was redundant, when I attempt to us this on one of my tests , I'm getting different errors based on which browser I'm using

Thanks

Chris
Boyan Boev
Telerik team
 answered on 14 Mar 2014
3 answers
109 views
I need to write a reusable testing function that will find a nested IFrame and return it as a Browser object to be used later.  The code below never seems to find the nested frame.  frameCount always comes back equal to one (even though there are 2 frames on the page, the parent frame and the nested frame).  Manager.ActiveBrowser.WaitForFrame(leaseCalcFrame) always returns null.  Thoughts on what I could be doing wrong or missing?  Thanks!

            Manager.ActiveBrowser.Frames.WaitAllUntilReady();
            Manager.ActiveBrowser.Frames.RefreshAllDomTrees();
            var framesCount = Manager.ActiveBrowser.Frames.Count;
            var leaseCalcFrame = new FrameInfo { Id = "NestedFrameId", Name = "NestedFrameName" };

            if (Manager.ActiveBrowser.WaitForFrame(leaseCalcFrame) != null)
            {
                var iframe = Manager.ActiveBrowser.Frames[leaseCalcFrame.Id];
                iframe.WaitUntilReady();
                return iframe;
            }

            return null;

Velin Koychev
Telerik team
 answered on 14 Mar 2014
3 answers
124 views
Hi Guys

I was wondering if anyone could help. I am attempting to create a test which uses an If else statement following the â€‹Pseudocode below

if(Test as Step executing has passed)
       Log that the Test as Step has passed (i.e. so that the tester knows the pre-conditions have been met) 
       Continue with this test case
Else
       Log an error or fail and stop the test stating that this has failed.


Is it possible to get the results from a test case that you are using as a 'test as Step'?

Thanks

Chris
Christopher
Top achievements
Rank 1
 answered on 13 Mar 2014
1 answer
180 views
Hi,

I have a couple of  websites to automate and they only differ in data. i.e. all the CSS is same.
Consider the 2 websites:
http://tradetrucks.com.au/
http://tradefarmmachinery.com.au/

I need to click on 1st element  on the home page of tradetrucks, which has the xpath:/html/body/div/div/div/div[3]/div/form/div/div/div/div/div/a
and the 1st element on the home page of tradefarmmachinery also has same xpath: /html/body/div/div/div/div[3]/div/form/div/div/div/div/div/a

But, when I record the test of clicking on the element in test studio on one of the website, I cannot reuse it for other website because the teststudio considers all the properties of element to identify it.

How do I make test studio use only xpath in identifying this single element. The rest of the elements in the test have to be identified with all properties.

Please help.

Thanks,
Meher
Boyan Boev
Telerik team
 answered on 13 Mar 2014
7 answers
432 views
Hi,

I have an If using a verify exist validation to handle the case when an error message is displayed after a button is clicked.
I noticed that usually the If does not look like it executes so I added another Verify Exists before the If and sure enough the Verify Exists fails immediately without waiting the 10s timeout configured for the step. Adding a 2s wait will solve the problem (see screenshot) however I do not want to wait a fixed amount of time before checking (and it could also take more than 2 s for that error to appear).

Is this a Test Studio bug?

Regards,
Ory
Boyan Boev
Telerik team
 answered on 13 Mar 2014
2 answers
164 views
Our app will be getting a dynamic window title. This has caused problems in Test Studio since the elements are categorized under window titles. A change in the title of a window causes the tests to wait for the old window title before searching for the element. I've tried in the element's explorer to change the caption and friendly name of the window holding the elements to a partial title. This works only for the time I am working in Test Studio. If I close out and reload, then about half of the elements that were changed will be rebuilt under the old window title, and half will remain the new title. I can't seem to get all of the elements to accept the new partial title for the window on reload.
Konstantin Petkov
Telerik team
 answered on 13 Mar 2014
1 answer
130 views
I'm attempting to use a coded step to do a series of actions, including selecting an item from a silverlight radcombobox.  I can record/playback this exact scenario without any problems, but when I attempt to do the exact same thing through code I get the following error:

Error:
System.ArgumentException: ComboBox contains no items to search in and select! Please make sure the test case opens the drop down first.

Code Snippet #1 that caused error:
comboBox.SelectItem("TEST", true);  //this should both open and select the TEST item from the comobox

Code Snippet #2 attempting to workaround, the same error is triggered:
comboBox.User.Click(); //Open combobox manually
System.Threading.Thread.Sleep(5000); //Manual wait, just in case it was a speed issue
comboBox.SelectItem("TEST", false); //select the TEST item from an open combobox

Code Snippet #3 attempting to workaround, no error is triggered as the foreach is skipped because there are zero items found:
comboBox.User.Click(); //Open combobox manually
System.Threading.Thread.Sleep(5000); //Manual wait, just in case it was a speed issue
foreach (Telerik.WebAii.Controls.Xaml.RadComboBoxItem rcbi in comboBox.ItemElements) //attempting to loop through all items in combobox
{
   if (rcbi.ToString() == "TEST")
     {
         rcbi.User.Click();
     }
}

Copied from DOM:
<radcombobox Name="comboBox" AutomationId="comboBox" Uid="30481338">
  <grid Name="VisualRoot" Uid="3226344">
    <border Uid="16841414" />
    <radtogglebutton Name="PART_DropDownButton" AutomationId="PART_DropDownButton" Uid="33647865">
    </radtogglebutton>
    <validationtooltip Name="ValidationTooltip" BaseType="Control" Uid="34395333" />
    <popup Name="PART_Popup" AutomationId="PART_Popup" Uid="45097725">
      <grid Name="PopupRoot" Uid="43140557">
        <shadowchrome BaseType="Control" Uid="41122544">
        <border Name="PART_ResizeBorder" Uid="27380479">
          <grid Uid="47781518">
            <radbutton Name="PART_ClearButton" AutomationId="PART_ClearButton" Uid="34558579" />
            <scrollviewer Name="PART_ScrollViewer" AutomationId="PART_ScrollViewer" Uid="42591759">
              <border Uid="65381771">
                <grid Uid="14721181">
                  <scrollcontentpresenter Name="ScrollContentPresenter" Uid="10290070">
                    <itemspresenter Uid="51565033">
                      <stackpanel Uid="61432121">
                        <radcomboboxitem Uid="16018178">
                          <border Uid="309837">
                            <grid Uid="51795644">
                              <border Name="HighlightVisual" Uid="21433500">
                                <border Uid="58683773" />
                              </border>
                              <contentpresenter Name="Content" Uid="63507614">
                                <grid Uid="43843091">
                                  <textblock Uid="34697616">TEST</textblock>


Am I missing something?

Konstantin Petkov
Telerik team
 answered on 12 Mar 2014
14 answers
648 views
Hello,
I've been having an issue lately with running my tests.  A simple link walkthrough (just testing all the main menu links) seems to fail once it starts clicking on links with this error:

ExecuteCommand failed!
BrowserCommand (Type:'Information',Info:'IsReady',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_ec029db2-58f2-48d9-9472-75d877e9c0b3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.IO.IOException: Pipe is broken.
   at System.IO.Pipes.PipeStream.WinIOError(Int32 errorCode)
   at System.IO.Pipes.PipeStream.WaitForPipeDrain()
   at ArtOfTest.WebAii.Messaging.Process.BrowserRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)

Just wanting to know what's causing this.  As recreating the step seems to work so its definitely finding the link.
Cody
Telerik team
 answered on 11 Mar 2014
3 answers
98 views
Hello,

I am working on simplifying a number of tests for my employer; the old tests are large and cumbersome and our intention is to create small atomic tests.

I am curious how Telerik suggests to perform a test such as 'add user' without relying on a 'login' test to navigate to the desired page.

We do not wish to test more than one funtion per test, it seems to me that navigation, verification, or even login and verification tests used as your early steps make this test anything but atomic. 

thank you
Cody
Telerik team
 answered on 11 Mar 2014
1 answer
181 views
I've searched all over and I can't seem to find this basic functionality.  Where/how do I associate an automated test I created in Test Studio with a manual test that is already written in Microsoft Test Manager (MTM)?  I have existing CodedUI automation that runs on a nightly basis through TFS and I want to include the new TS automation in this same build.

Thanks,
Nick
Cody
Telerik team
 answered on 11 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?