Telerik Forums
Test Studio Forum
2 answers
412 views
Hi,

This is a somewhat convoluted request, but I'll do my best to describe it!

I am trying to test a section of our app, and we are using the Rad Treeview control which has been slightly modified to incorporate some extra functionality. From what I can see, on the front end the treeview is built using a series of divs and spans, most of which use the same classes. I am trying to find particular nodes in the treeview but our modifications pass id's (which are randomly generated) to the particular nodes, so I cannot use these for finding elements.

A sample of code containing the elements I am trying to find is below. In particular I am trying to find the span with the id thisSpan_randomId. All of the specific attributes of this element are shared with other objects in the DOM.

<div class="rtBot">   
    <span class="rtSp"></span>  
    <span class="rtPlus"></span>  
    <img src="" longdesc="Region" alt="" class="rtImg">  
    <span class="rtIn">TS Test Region  
       <span class="tvContext" name="contextMenu" style="display:none;" id="thisSpan_randomId">  
          <a href='javascript:addRegionAccess("","747383be52bd4960b0b12331ed690c26", "TS%20Test%20Region");' innerhtml="Add Region Access" class="addRegion">Add Region Access</a>  
       </span>  
    </span>  
</div>

Using the Find Element dialog, I can locate the parent of the element I am trying to find using TextContent is exactly TS Test Region, but the child has no particular identifiers that I can use that are not already shared with other elements on the page.

Is there a way I can find this child element (with no unique identifiers) by first finding the parent (with unique identifiers)?

Hopefully this makes a bit of sense!

Cheers,

Lachlan
Lachlan
Top achievements
Rank 1
 answered on 11 Oct 2012
1 answer
127 views
Hello,

How I can find an element among the same elements on the page (Silverlight app)? Recording the clicking those elements I can see that Telerik TS recognizes them using XamlPath. But for me it is not reliable way of identification.
Could you advise please, probably there is functionality which allows to define parent object and then find childs in it?

Thank you,
Vitaliy
Byron
Telerik team
 answered on 11 Oct 2012
3 answers
125 views
Hi -

I have two tests in the project, Test1 and Test2.
The Test1 is started first in web browser (Silverlight app) and then IE closed when the Test1 is completed and new IE instance is being started for the Test2.
But I want to continue with Test2 from where the Test1 was finished. I don't want to close IE and start new one. How to attain this?

Many thanks,
Vitaliy
Stoich
Telerik team
 answered on 11 Oct 2012
2 answers
101 views
I believe I've configured the load test controller and reporter correctly on my machine. All services in "Test Studio Services Configuration" started successfully. The scheduling and reporting databases were created on my SQL Server. However, after I added a new load test, the "Computer" drop down list under "Controller and Reporter" is always empty! I am stuck. Please help!

Systems
Top achievements
Rank 1
 answered on 10 Oct 2012
1 answer
159 views
Hi,

I'm using trial version 2012.2.920.0 of TestStudio and when i start to execute my test  - the execution has been failed with the following exception in log file:

'10/8/2012 1:23:43 PM' - Using .Net Runtime version: '4.0.30319.17929' for tests execution.'10/8/2012 1:23:43 PM' - Starting execution....'10/8/2012 1:23:43 PM' - Detected a Silverlight Test. Setting EnableSilverlight=True'10/8/2012 1:23:44 PM' - Failure detected during execution. Details:------------------------------------------------------------'10/8/2012 1:23:44 PM' - ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!BrowserCommand (Type:'Information',Info:'IsReady',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_00e508d3-d197-47d4-88ea-7150208bf338',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')InnerException: System.NullReferenceException: Object reference not set to an instance of an object. at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request) ---> System.NullReferenceException: Object reference not set to an instance of an object. at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request) --- End of inner exception stack trace --- at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request) at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady) at ArtOfTest.WebAii.Core.Browser.IsReady() at ArtOfTest.WebAii.Core.Browser.WaitUntilReady() at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments) at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(ProcessWindowStyle windowStyle, String arguments) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InitializeWeb(ExecutionEngineCreateParams initParams) at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.CreateAndInitializeEngine(Test test, ExecutionEngineCreateParams cp) at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)------------------------------------------------------------'10/8/2012 1:23:45 PM' - Test completed!

Mario
Telerik team
 answered on 10 Oct 2012
2 answers
92 views
Hello,

Is there a way to turn this setting off?  I use the 'Run from Here' method to execute a handful of steps that I just created.  I have never needed to continue recording when the 'Run from Here' has completed, and I don't see myself using it during construction.  I would imagine that every Telerik user (at least once) has continued on without clicking the Pause Recording button, unintentionally, followed by a number of expletives!

Let me know you think...thanks!
Alan
Alan
Top achievements
Rank 2
 answered on 10 Oct 2012
3 answers
182 views
Hi,

I've seen the example of how to access SQL database from the code, which would work perfectly fine. One thing I don't like thought, is defining the connection string in the code. I'd rather have access to a connection string property of my datasource which is defined in the project. Is this currently possible?

Regards.
Byron
Telerik team
 answered on 10 Oct 2012
31 answers
265 views
Hi,

I have problem with launch recorder at Windows Vista. I installed Test Studio on Win7 and there is no problem, but on Vista machine, I have get "Unable to launch recorder" error. I have tried almost every solution recommendation in this forum but none of them solved my problem.

Log file

 [06/16 15:41:18,Telerik.TestStudio.exe(1248:18)] First trace message from process 1248: "C:\Program Files (x86)\Telerik\Test Studio\Bin\Telerik.TestStudio.exe" 
[06/16 15:41:18,Telerik.TestStudio.exe(1248:18)] First trace message from pool unnamed thread (managed ID = 18, native ID = 5660).
[06/16 15:41:18,Telerik.TestStudio.exe(1248:18),Framework] Manager.get_ActiveBrowser() : The current ActiveBrowser is either invisible or disconnected.
[06/16 15:41:18,Telerik.TestStudio.exe(1248:18)] First trace message from pool thread "EnsureActiveBrowser worker" (managed ID = 18, native ID = 5660).
[06/16 15:41:18,Telerik.TestStudio.exe(1248:18),Framework] InternetExplorerActions.LaunchNewBrowserInstance() : Process launched (ID=5708, Path="C:\Program Files (x86)\Internet Explorer\iexplore.exe", Arguments="-nomerge about:blank").
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] InternetExplorerActions.LaunchNewBrowserInstance() : Attempting to attach on IE frame (HWND=460388)...
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] Connector.Start() : Process launched (ID=3536, Path="C:\Windows\SysWOW64\rundll32.exe", Arguments="ArtOfTest.Connector.dll,AttachToWindowEntryPoint 591540").
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] Connector.Start() : Process exited (ID=3536, ExitCode=0, Path="C:\Windows\SysWOW64\rundll32.exe", Arguments="ArtOfTest.Connector.dll,AttachToWindowEntryPoint 591540").
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] InternetExplorerActions.LaunchNewBrowserInstance() : Process "Telerik.TestStudio" (ID=1248) is assumed to host the controller.
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] Connector.InjectCode() : ------- Function Start -------
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] Connector.InjectCode() : Connection string: C:\Windows\assembly\GAC_MSIL\ArtOfTest.InternetExplorer\2012.1.411.0__5339893a7cefe4d6\ArtOfTest.InternetExplorer.dll?ArtOfTest.InternetExplorer.ArtOfTestPluginEntryPoint?1248
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] InternetExplorerActions.WaitForDocument() : Attempting to get IHTMLDocument2 from Internet Explorer HWND 591540 on another thread...
[06/16 15:41:19,Telerik.TestStudio.exe(1248:14)] First trace message from pool thread "WaitAsync polling wait worker" (managed ID = 14, native ID = 5272).
[06/16 15:41:19,Telerik.TestStudio.exe(1248:14),Framework] <>c__DisplayClassf.<WaitForDocument>b__8() : Attempting to get document from window handle
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] InternetExplorerActions.WaitForDocument() : IHTMLDocument2 successfully retrieved.
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] Connector.InjectCode() : Sending WM_COPYDATA to HWND 591540 (lpData = "C:\Windows\assembly\GAC_MSIL\ArtOfTest.InternetExplorer\2012.1.411.0__5339893a7cefe4d6\ArtOfTest.InternetExplorer.dll?ArtOfTest.InternetExplorer.ArtOfTestPluginEntryPoint?1248")...
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] Connector.InjectCode() : Returned from sending WM_COPYDATA (LRESULT=0, GetLastError()=ERROR_ALREADY_EXISTS).
[06/16 15:41:19,Telerik.TestStudio.exe(1248:18),Framework] Connector.InjectCode() : ------- Function End -------
[06/16 15:41:49,Telerik.TestStudio.exe(1248:18),Recording] <>c__DisplayClass9.<EnsureActiveBrowser>b__8() : EXCEPTION! (see below)
     Outer Exception Type: System.TimeoutException
     Message: Wait for condition has timed out
     HRESULT: 0x80131505 (Official ID (if app.) = COR_E_TIMEOUT, Error Bit = FAILED, Facility = FACILITY_URT, Code = 5381)
     Call Stack:
          at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
          at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
          at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
          at ArtOfTest.WebAii.Core.Manager.WaitForBrowserToConnect(Int32 browserIndexToWaitFor)
          at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
          at Telerik.TestStudio.Web.WebRecorderWindowManager.GetActiveBrowser(Boolean createOneIfNeeded, String arguments)
          at Telerik.TestStudio.Web.WebRecorderWindowManager.<>c__DisplayClass9.<EnsureActiveBrowser>b__8(Object obj)


[06/16 15:41:49,Telerik.TestStudio.exe(1248:18),Recording] RecordViewController.BrowserLaunched() : Error launching the recorder. Error : System.TimeoutException: Wait for condition has timed out
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
   at ArtOfTest.WebAii.Core.Manager.WaitForBrowserToConnect(Int32 browserIndexToWaitFor)
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
   at Telerik.TestStudio.Web.WebRecorderWindowManager.GetActiveBrowser(Boolean createOneIfNeeded, String arguments)
Cody
Telerik team
 answered on 10 Oct 2012
3 answers
147 views
Hi,

I was wondering if somebody could help me with my test design in relation to a navigation bar which is on every page.  Basically on our website which I am going to be running through automation, I'd like to creat some generic functionality to navigate around the site by passing through the link text to click on.  So far I have tried using record and play ( please bear in mind that I have come from a fully coded automation system prior to test studio ) but found that the element repository will become very bloated if I have to add an element per navigation link under every single page, especially as the users of the site are able to dynamically create there own pages with navigation links. If you see the attached image "NavigationBar.jpg", this is the navigation bar which displays on every page in it's most basic default form.

The best way I have come up with so far is to create a coded step as follows:

[CodedStep(@"Clicks one of the Search tabs")]
public void Click_Product_Search_Tab( string productNavLinkToClick )
{
    HtmlFindExpression expression = new HtmlFindExpression("tagname=a", "id=?searchLink", "textcontent=" + productNavLinkToClick );
    Element eLink = new Element( expression, Find, ActiveBrowser );
    eLink.Wait.ForExists( 30000 );
    HtmlAnchor hotelNavLink = new HtmlAnchor( eLink );
      
    if ( hotelNavLink != null )
        hotelNavLink.Click();
      
    Assert.IsNull( hotelNavLink );
      
      
}

I feel this would keep the functionality re-usable.  To test it I removes the productNavLinkToClick  argument and created a local data table with one cell/column which contained "hotel" replacing the HtmlFindExpression with Data[0].ToString() so I know the code itself works, but I am struggling to make it re-usable by the QA Manual testers who are not code literate.  I was hoping either for them to be able to just drag and drop my coded step and add the value of productNavLinkToClick themselves, or for me to intelligentally work out what page I am on and need to get to and call into this coded step accordingly.

I would be grateful if you could let me know if I am on the right track for a maintenance free navigation test or whether there is some better design?  I would be happy to tweak what I have done if required.

Please let me know if you require any further information

Many Thanks
Shane
Byron
Telerik team
 answered on 09 Oct 2012
3 answers
104 views
I was able to successfully run the performance test script on a machine with a runtime license. The test results with the .tsperf file extension are captured successfully in a folder.

However, I am unable to open the .tsperf file to view the test results, which makes the tests useless :-(

Any suggestions?
Mario
Telerik team
 answered on 09 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?