Completed
Last Updated: 12 Feb 2014 15:41 by ADMIN
ADMIN
Cody
Created on: 13 Jun 2013 19:53
Type: Feature Request
2
Need method of handling dynamic frames
In customer's application it generates a number of dynamic frames. The Name and ID will changes based on if it's the first or second or third tab of the application. This means you cannot use these properties to reliably find the correct frame because when you run the test you don't know which tab it will generate. The baseurl of the src attribute is always the same no matter what type of tab is being created, so you can't rely on that either. There is a long complicated query string which can be used to identify the correct frame however the client needs this to be parameterized for reusable subtests. One test will require one value and another test will require a different value (e.g. the name of a "Property" as created and used in their application). Ideally they would like to be able to data drive the Frame Info just like you can data drive finding elements. Barring that they need some mechanism of being able to parameterize which frame to look in when looking for elements. Different tests will create different frames with different src values but the rest of the content in the frame will be the same e.g. the tab for Property AAA will have the same elements as the tab for Property BBB. But since they src property is different they are currently being forward to write two different tests that effectively do exaclty the same thing but in different frames.
4 comments
ADMIN
Shtilianov
Posted on: 12 Feb 2014 15:41
We have implemented an option to use custom tags in frames which should help in your case. You can check this article in the documentation for more info: http://docs.telerik.com/teststudio/user-guide/code-samples/html/tagframe.aspx
Basically using the latest release you should be able to both add a simple tag in the iFrame itself like iframe src="http://www.example.com" testStudioTag="ExampleTag"></iframe> or you dynamically assign tag to iFrame in the code which will be set for the purposes of the running test using myFrame.TagFrame("MyCustomTag");
David
Posted on: 09 Jul 2013 14:02
Thanks Konstantin -

Maybe this is specific to our application, but I think this could potentially be an issue for any application where the frame id didn't imply the content of the frame.  For example, you may have a region of the screen for search - that is specific, doesn't change and there is no issue writing a reusable script for that.   However, if you have a frame or series of frames which can hold dynamic content, then you there is difficulty writing a reusable test against some specific content because you don't know which frame it might be in - the frame id's are static.

There is potential to use the src URL, but we have found that the syntax there isn't quite flexible enough either.

In terms of the end user experience - it would be great if we could include a variable in either the frame id or the frame source.  No comment on how difficult or feasible that is in code :).

You can get details on how to reproduce in ticket #703224.

Hope this helps!
ADMIN
Konstantin Petkov
Posted on: 09 Jul 2013 13:23
Hello,

This sounds really specific to the application under test. Is there a chance you can share a sample application (you can send it to support folks if you don't want to expose it to public) so that we can look for a possible solution? It also sounds like you are unable to generate tests for those frames so this could well be a problem for us to look at rather than feature request.

Thanks!
David
Posted on: 15 Jun 2013 13:20
Just to summarize - sometimes frames aren't specific to the content they contain, they just define a region of the page.  In our case that region is a tab and the content in the tab can be variable.  The problem comes in when you try to write a *reusable* script.  A reusable script is trying to be generic and work with some specific content - seems there isn't a way to let the script operate on the content independent of which tab it is on.

When you are calling a reusable script, you know the current state and could set the correct Frame ID (for example), but there isn't a standard way to do that - Frame ID's are hard coded.