Help——how to get the url attribute Of Frame?

Class library usage, coding and language questions.
User avatar
taoyang987
Posts: 19
Joined: Sun Jan 06, 2013 8:43 am

Help——how to get the url attribute Of Frame?

Post by taoyang987 » Thu Jan 17, 2013 3:59 am

i use qtp before.i know to use "GetRoProperty("url") "to get the url attribute Of iFrame.but now with Ranorex,i can't find the way.i only find that WebDocumentClass has the Property PageUrl .but with the iFrame class,i found nothing.so can you help me?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Help——how to get the url attribute Of Frame?

Post by Support Team » Thu Jan 17, 2013 4:34 pm

Hello,

In order to get the URL of the IFrame I would use the Src attribute using the IFrame tag.
IFrameTag yourIframe = @"/dom[@domain='yourDomaine']/body/iframe";
string URL = yourIframe.Src;
Report.Info(URL);
Regards,
Bernhard
.
Image

User avatar
taoyang987
Posts: 19
Joined: Sun Jan 06, 2013 8:43 am

Re: Help——how to get the url attribute Of Frame?

Post by taoyang987 » Fri Jan 18, 2013 4:15 am

Thanks .
But I found it not working.I try the spy with other html iframe,it works .i look up the html code,and found that the arribute of "src" is null. i search the forum,and find a similar post.i think maybe the iframe dynamically load a page,so the src is null.
http://www.ranorex.com/forum/iframe-src ... t2525.html

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Help——how to get the url attribute Of Frame?

Post by Support Team » Mon Jan 21, 2013 4:26 pm

Hello,

If there is no attribute with the URL as value, it is not possible to get the URL from your iframe.
Could you send us a snapshot file in order to analyze the issue?
Please read the section 'Creating Ranorex Snapshot Files' to get more information about Ranorex Snapshots.

Regards,
Bernhard
.
Image

User avatar
taoyang987
Posts: 19
Joined: Sun Jan 06, 2013 8:43 am

Re: Help——how to get the url attribute Of Frame?

Post by taoyang987 » Thu Jan 24, 2013 8:35 am

Thanks ,Bernhard。
I waiting for couple of days , I thought you won't reply.
here is th snapshot .i'm looking for the exact url of the frame .//iframe[#'BizClientArea']:
i wanna get the " RECORDERGUID=20130124-7297-0001 "in the url.in qtp,the whole url
can getted by getAttribute easily

http://192.168.20.21/oa/Extensions/Gisq ... DESKTOP%3D
Attachments
a.rxsnp
(444.65 KiB) Downloaded 196 times
clipboard.png
clipboard.png (4.93 KiB) Viewed 1386 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Help——how to get the url attribute Of Frame?

Post by Support Team » Thu Jan 24, 2013 6:11 pm

Hi,

Could you please post a snapshot when the URL, the specific view from the posted image, is shown or is this not shown during automation?

Thanks,
Markus
.
Image