Telerik Forums
Test Studio Forum
3 answers
129 views

 I have an issue where a parent test is extracting a value from its dataset and which is used in the first iteration through the subtest, but when it comes back to reuse it an error re the extracted variable not being in the store occurs.

 

What I've got is: 

 

0 – Login - extracts value A from login dataset

                1 – Do scenarios - for each record in "scenario" dataset and create NEW dataset based on information extracted from "scenario" dataset AND "extracted value A"

                                2 – run tests based on created dataset  

 

Now as each test/subtest has its own dataset, it can’t inherit from its parent BUT the first run through test #1 it uses "extracted value A" with no problem.  When it attempts to run through it again the "extracted value A" appears to have been lost as it throws an error when I'm recreating the dataset.

 

Each subtest is set as a test fragment, and they both reuse the app window.  Only the initial "0 - Login" test is set to use a new window - but that it isn't getting that far.

Hopefully I haven't confused you.

Any ideas?

Thanks

Cheryl

Byron
Telerik team
 answered on 10 May 2012
2 answers
157 views
Hello,

From time to time I get strange tests failture reports on wait for ajax.
I'm using a code from this forum:
[CodedStep("Wait for AJAX")]
        public void AjaxWait()
        {
            Wait.For<int>(c => ActiveAjaxConnections() == 0, 0, 120000);
        }
  
        public int ActiveAjaxConnections()
        {
            return Actions.InvokeScript<int>("jQuery.active");
        }

It works great but from time to time exception is thrown and I get false alerts on application status:
Here is stack trace for the exception:
System.ApplicationException: Exception thrown during the wait for a condition. Error: Unexpected error while waiting on condition. Error: ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.InvalidOperationException: Javascript call [JSON.stringify(eval(\"jQuery.active\"));] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: TypeError: 'jQuery' is undefined
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJSON)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document) BrowserCommand (Type:'Action',Info:'NotSet',Action:'InvokeJsFunctionReturnJSON',Target:'ElementId (tagName: '',occurrenceIndex: '-1')',Data:'jQuery.active',ClientId:'Client_e44e8a42-9bf5-4df0-940f-bae9ef9c4df0',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.InvalidOperationException: Javascript call [JSON.stringify(eval(\"jQuery.active\"));] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: TypeError: 'jQuery' is undefined
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJSON)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.
 
   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.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.InvokeScript[T](String script)
   at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.InvokeScript[T](String script)

Any idea how to prevent it?

I could use try / catch block but I don't like this solution because I would'n get info when something really wrong happens to my application.

I'm using Telerik Test Studio version 2011.2.928.0

Bartosz
Bartosz
Top achievements
Rank 1
 answered on 10 May 2012
2 answers
149 views
Is it possible to export a manual test in excel?
Konstantin Petkov
Telerik team
 answered on 10 May 2012
1 answer
111 views
Using the latest trial version and Safari 5.1.

I have a click event on a tree node which loads a document in an iframe. Using debug mode I open the Find Element dialog and click Troubleshoot then Select a New Element.

This is all I see in the element:
<html><head><script src="safari-extension://com.telerik.webui-KHL9D64Z9H/44544ee7/windowMessageHandler.js"></script></head><body></body></html>

In the browser the iframe has loaded normally.

The same test works fine in IE, Chrome and Firefox.

I've ensured all the browser settings are ok for Safari.

Is there a quick fix for this?

Cheers,
Steve

Stoich
Telerik team
 answered on 10 May 2012
1 answer
67 views
If i want to run a test case for many times,
then i want to have a report describe how long it takes for each iteration for the same test case. how can i find that...??
And draw a graph compare the time takes each iteration.how i can find that...??

Thanks alot.

Stoich
Telerik team
 answered on 10 May 2012
4 answers
171 views

Hi Telerik Team,

I am trying to read data from a HTMLTable type control. The frame in which this control is placed is using a dynamic query.  IFrmae src property is displayed as: <partial url>?mode=<static string>&ID=<dynamic number>

Due to this I am not able to identify the frame and getting error as:

Waiting for frame '[Frame:src=~<partial url>?mode=<static  string>&ID=<dynamic number>,UseQuery:True]' timed out. Error: Wait for condition has timed out

I tried to executing the code by setting ‘UseQuery’ attribute to ‘False’ in element explorer. But it was causing problems as there is similar frame being used on different page of my application. In that case  the src=<partial url> property is same for both the frames so I cannot set ‘UseQuery’ attribute to ‘False’.

Is there a way I can handle the dynamic id generated for the Frames Query string?

Stoich
Telerik team
 answered on 09 May 2012
1 answer
124 views
As subject state, IE9 fails to recognize the selected index or option changed with the following method and trigger ajax post back.

Manager.ActiveBrowser.Find.ById<HtmlSelect>("SelectID").SelectByValue("Value");

This does work with Firefox and Chrome.

Can you suggest any solution or workaround?
Byron
Telerik team
 answered on 07 May 2012
2 answers
99 views
Hi Telerik team,
        I am trying to connect a SQL Database for Data Driven Testing. I was able to successfully establish the connection and create a Data Source but when i try to Bind the test to data source, i am getting a "Error Setting the current Data Source" and "unable to show the data. Error: Keyword not supported: 'driver'."
Screenshot of the errors is attached.

Any help is appreciated!!

Thank you,
Nithin
Anthony
Telerik team
 answered on 07 May 2012
1 answer
75 views
Hello,

It appears the checks for Application.Current.IsRunningOutOfBrowser does not work with Test Studio. After disabling the check in a couple of places to bypass it, I finally hit a wall with a login page that uses the webBrowser control. I'm unable to record my OOB application. See image attached.
Anthony
Telerik team
 answered on 04 May 2012
2 answers
124 views
I just spent the last several hours trying to figure out why my coded step to handle a file upload dialog absolutely would not work when used in a data-driven test, and I feel that I should pass this bit of info along in case anybody else is running into similar issues.

My situation is as follows:
  • I'm using the TestStudio Standalone version to test an ASP.NET Web Application.
  • I'm testing a set of actions wherein a file input html control is used at some point.
    I wanted to extract the exact bits where the file input is handled so that I could reuse it in my similar tests.
  • I made a small data-driven test to do this that inherits its data-source from its parent.
  • That test would run properly on its first iteration but on any of the following iterations, nothing would happen once the file upload dialog popped up.

To make a long story short, I was following examples that I found online (mostly from these forums) where people were trying to programatically handle dialogs, and in most of those threads, "Manager.DialogMonitor.Start();" and "Manager.DialogMonitor.Stop();" were being called before and after (respectively) the dialog was handled in the code.  As it turns out, though, once "DialogMonitor.Stop();" is called, the DialogMonitor cannot be started again, which is why only the first iteration of my test was working.

Now that I think about it, most of those threads were probably posted by people using the TestStudio VS Plugin as opposed to the Standalone version.  Regardless, I never saw any mention of the fact that explicitely stopping the DialogMonitor in the Standalone version would render it unable to be started again.  As I also found out, it doesn't need to be explicitely started in the Standalone version either, but that's besides the point.

I did notice that in the TestStudio Standalone Documentation, the Start/Stop methods aren't included in the examples, but at the time, I presumed that was for the sake of brevity and merely glanced over it.  Perhaps I'm just blind, but in my humble opinion, it should be more obvious that these two methods should not be used when working with the Standalone version (presuming that the issue I ran into isn't a bug).  It may be a small issue, but it killed much of my productivity for a day.

Max
Top achievements
Rank 1
 answered on 04 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?