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
[CodedStep("Wait for AJAX")] public void AjaxWait() { Wait.For<int>(c => ActiveAjaxConnections() == 0, 0, 120000); } public int ActiveAjaxConnections() { return Actions.InvokeScript<int>("jQuery.active"); }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)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?
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.