How to identify UI elements in iFrameTag

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
skieur
Posts: 8
Joined: Mon Mar 06, 2017 11:20 am

How to identify UI elements in iFrameTag

Post by skieur » Mon Mar 06, 2017 11:28 am

Hi experts,

We are using Ranorex (version 6.2.1) for automation test, currently we are facing a critical issue, hope you guys can help us :D :D .

In our login page, the input box of username and password are hidden in iframe. It looks like Ranorex cannot identify UI elements in iframe. When running test case, ranorex can not find the elements. Our product is on desktop using Chrome, technically iframeTag is already supported by Ranorex.

The UI elements level is like: iframeTag->BodyTag->DivTag->DivTag->FormTag->DivTag->InputTag

I tried to use C# codes to find the InputTag elements, but it looks like Ranorex can only find the descendants of iframeTag: BodyTag, the descendants of BodyTag can not be found. The snippet of my code:

// find descendants in IframeTag
Report.Info("the name of this element:"+iframetagInfo.FindAdapter<IFrameTag>().TagName);
IList<BodyTag> descendantsIframe = iframetagInfo.FindAdapter<IFrameTag>().FindDescendants<BodyTag>();
Report.Info("the number of BodyTag descendants in Iframe:"+descendantsIframe.Count);
foreach(BodyTag child in descendantsIframe){
Report.Info(child.ToString());
IList<DivTag> descendantsBodyTag = child.FindDescendants<DivTag>();
foreach(DivTag child2 in descendantsBodyTag){
Report.Info(child2.ToString()); // no output
}
}


Anyone knows how to get this work?. Thanks in advance.

Best Regards

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to identify UI elements in iFrameTag

Post by odklizec » Wed Mar 15, 2017 8:48 am

Hi,

Next time, please don't forget to post also Ranorex snapshot in your query. Typically, there is not much anyone here can do without at LEAST Ranorex snapshot. Snapshots are critical for clear understanding of the problem. If you can't post snapshot, create a small demo (HTML) describing the problem.

Anyway, problem like yours, has been discussed few days back. Please check this post with solution:
http://www.ranorex.com/forum/how-to-ide ... 10610.html
Hope this helps you as well ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration