Hi guys,
I faced a pretty specific problem.
As I know in order to access nested iFrames in Telerik Testing Framework I have to use ActiveBrowser.Frames collection.
The problem is that this collection is filled different way for IE and other browsers.
For Chrome and Firefox the frames collection is filled in the order frames are rendered in DOM. E.g. last added frame is last in the list.
So that frames have static indexes.
In IE the frames in collection are listed in the order of their appearance in the DOM. When the new iFrames are added before older frames their indexes are shifted.
It looks like this thing cause tricky issue when kind of collision of similar frames appears in complex web application. Found elements interactions are performed on active (with bigger z-index) frame instead of their original frame. I was not able to reproduce my issue on any public page but below is code that demonstrate the difference in framework behavior in IE and other browsers. It passes in Chrome and Firefox while fails in IE.
Currently I managed to work around by searching for frame by its UniqueId every time I need to interact with it (if there is more elegant way to "refresh" the frame I would appreciate your advice). But I hope that it can be fixed in the framework so that it works same way in all browsers and after coming release we do not need to write additional logic specially for IE.
Thank you in advance.
I faced a pretty specific problem.
As I know in order to access nested iFrames in Telerik Testing Framework I have to use ActiveBrowser.Frames collection.
The problem is that this collection is filled different way for IE and other browsers.
For Chrome and Firefox the frames collection is filled in the order frames are rendered in DOM. E.g. last added frame is last in the list.
So that frames have static indexes.
In IE the frames in collection are listed in the order of their appearance in the DOM. When the new iFrames are added before older frames their indexes are shifted.
It looks like this thing cause tricky issue when kind of collision of similar frames appears in complex web application. Found elements interactions are performed on active (with bigger z-index) frame instead of their original frame. I was not able to reproduce my issue on any public page but below is code that demonstrate the difference in framework behavior in IE and other browsers. It passes in Chrome and Firefox while fails in IE.
ActiveBrowser.NavigateTo(
"http://demos.telerik.com/aspnet-ajax/editor/examples/editorinradwindow/defaultcs.aspx"
);
var radEditor1 = ActiveBrowser.Frames.ById(
"~RadEditor"
);
Assert.That(ActiveBrowser.Frames.Count, Is.EqualTo(1));
var openButton = ActiveBrowser.Find.jQuery().attributes(
"title=Open Advanced Editor"
).first<HtmlAnchor>();
openButton.Click();
ActiveBrowser.RefreshDomTree();
var radEditor2 = ActiveBrowser.Frames.ById(
"~RadEditor"
);
Assert.That(radEditor1.FrameInfo.Index, Is.EqualTo(radEditor2.FrameInfo.Index));
Currently I managed to work around by searching for frame by its UniqueId every time I need to interact with it (if there is more elegant way to "refresh" the frame I would appreciate your advice). But I hope that it can be fixed in the framework so that it works same way in all browsers and after coming release we do not need to write additional logic specially for IE.
Thank you in advance.