I was reading the documentation on data driven testing and I had a few questions in regards to data driven tests on multiple levels.
The User Guide gave an example of a data-bound test executing a test as step where the test inherited the parent's data. Is this possible to do when the parent test is using local data, too or does this only work with data bound from elsewhere?
In the case of a data-bound test calling another data-bound test, is it possible for the child test to still use values from the parent test?
Not quite related to data-bound testing, can a child test use values extracted in a parent test using the extract feature?
It doesn't matter if it has to be coded or not, I just want to know if it's possible.
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?