This is a migrated thread and some comments may be shown as answers.

Getting error while identifying a Frame

4 Answers 136 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dipali
Top achievements
Rank 1
Dipali asked on 04 May 2012, 08:23 AM

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?

4 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 04 May 2012, 02:36 PM
Hi Dipali,
are you attempting to use this syntax:
<partial url>?mode=<static string>&ID=<dynamic number>
in Test Studio? If you are - it won't work. Test Studio will, unfortunately, not recognize this syntax.

Instead you can use the tilt character '~' to indicate a partial URL. From there you have to come up with a good way to isolate the dynamic parts of the src while at the same time still making sure the Find Logic stays unique. Check out the following article:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/recording-tests/frames.aspx

This approach is detailed near the bottom of the article.

All the best,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Dipali
Top achievements
Rank 1
answered on 04 May 2012, 02:54 PM

Hi Stoich,

Sorry for the confusion I created. I am not using this <partial url>?mode=<static string>&ID=<dynamic number> as syntax.

As I cannot disclose the url and query string for my application I had represented in the above format. I am already using the settings mentioned in the article given by you.

In my case frame do not have any id. I have below settings done for frame identification.  These are not real urls; mentioning it for understanding purpose.

BaseUrl: ~string1/string2.aspx

Index: 0

Query: abc=xyz&Id=123

Src: ~string1/string2.aspx

UseQuery: True

FriendlyName: ~MyFrame

UseBaseUrlHost: False

** Id and Name property is not set as this is not defined HTML of the page and does not getting set while recording.

123 is a dynamic number which is changing each time I execute the test. Is there a way to specify partial query string?

I tried using ‘*’ instead of ‘123’ but it’s not working.

I hope the data is clear to you now. Please let me know if you need more details.

Thanks,

-Dipali.

0
Dipali
Top achievements
Rank 1
answered on 08 May 2012, 09:31 AM

Hi,
I think, I have provided adequate explanation about the problem I am facing. Plesae le me know if you guys need more explanation or any data for the same.

Thanks,

-Dipali

0
Stoich
Telerik team
answered on 09 May 2012, 02:27 PM
Hello Dipali,

thank you for providing so much details on this. Unfortunately there's just no way to define a partial Query String. You can either choose to take the entire Query into account or choose not to. 

So, unfortunately it would seem that the solution in this instance would be for you to speak to your developers and try to get IDs or Name or some other way to making the Frames unique so that Test Studio may identify them.

We can create a Feature Request for the ability to use RegEx (or something similar) to define the Query String or just to be able use a partial Query. Let me know if this is a course of action you wish to purse.

All the best,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Dipali
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Dipali
Top achievements
Rank 1
Share this question
or