Page 1 of 1

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

Posted: Thu Jan 17, 2013 3:59 am
by taoyang987
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?

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

Posted: Thu Jan 17, 2013 4:34 pm
by Support Team
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

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

Posted: Fri Jan 18, 2013 4:15 am
by taoyang987
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

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

Posted: Mon Jan 21, 2013 4:26 pm
by Support Team
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

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

Posted: Thu Jan 24, 2013 8:35 am
by taoyang987
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

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

Posted: Thu Jan 24, 2013 6:11 pm
by Support Team
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