Telerik Forums
Testing Framework Forum
3 answers
125 views
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.

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.
Cody
Telerik team
 answered on 09 Aug 2013
2 answers
122 views
I am trying to debug a coded step in my test but I get an error in test explorer every time I attempt to debug. I have not had any problem running my tests that use BaseURL up to this point. Is there something special that you have to do to account for the BaseURL in test explorer? The error is as follows:

'8/2/2013 3:02:03 PM' - 'Fail' : 1. Navigate to : '~/iWeb'
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Unable to resolve the passed uri '/iWeb' to an absolute url.
InnerException:
System.UriFormatException: Unable to resolve the passed uri '/iWeb' to an absolute url.
   at ArtOfTest.WebAii.Core.Browser.BuildUrl(Uri passedUrl, Boolean useDecodedUrl)
   at ArtOfTest.WebAii.Core.Browser.InternalNavigateTo(Uri uri, Boolean useDecodedUrl)
   at ArtOfTest.WebAii.Core.Browser.NavigateTo(Uri uri, Boolean useDecodedUrl)
   at ArtOfTest.WebAii.Core.Browser.NavigateTo(String url, Boolean useDecodedUrl)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.NavigateToActionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'8/2/2013 3:02:03 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.



Michael
Top achievements
Rank 1
 answered on 08 Aug 2013
1 answer
130 views
Hi to all.


Given: file that needed to be downloaded by clicking on button(btnExportProfile)

Code: 

DownloadDialogsHandler part1_0 = new DownloadDialogsHandler(myManager.ActiveBrowser, DialogButton.SAVE, @"C:\", myManager.Desktop);
 
SaveAsDialog part2_0 = SaveAsDialog.CreateSaveAsDialog(myManager.ActiveBrowser, DialogButton.SAVE, @"", myManager.Desktop);
 
IE9DownloadCompleteNotificationBar dlComplete1 = new IE9DownloadCompleteNotificationBar(myManager.ActiveBrowser, DialogButton.CLOSE);
             
myManager.DialogMonitor.AddDialog(part2_0);
myManager.DialogMonitor.AddDialog(dlComplete1);
 
myManager.ActiveBrowser.Find.ById<HtmlControl>("btnExportProfile").Click();
 
System.Threading.Thread.Sleep(10000);
part1_0.WaitUntilHandled(40000);
part2_0.WaitUntilHandled(40000);
dlComplete1.WaitUntilHandled(50000);

The problem is: "complete notification" bar is always visible and cannot be closed. Seems  IE9DownloadCompleteNotificationBar does not work correctly.

Velin Koychev
Telerik team
 answered on 06 Aug 2013
2 answers
120 views
Hello,
I have a problem similar to the one described in this thread: http://www.telerik.com/automated-testing-tools/community/forums/test-studio-express/automation-framework/waituntilready-timed-out.aspx

I have noticed that browser (IE 8 or 9) always displays status "Ready" or "Processing..." in the status bar during test run, but I haven't reproduced it manually.

Thanks for any help
Boyan Boev
Telerik team
 answered on 05 Aug 2013
1 answer
165 views
Hi,

Do we have 'Wait until' function or similar function to resolve the following case? It's better to provide some sample code to me.

1. It is a HTMLSelect control, its values of drop down list are generated dynamically from database by an event.
2. The value list will be generated for some time.(2-3s).
3. I would like to wait for the value list generation and then execute further test action in my automation scripts.

My current solution is using "Thread.sleep" to wait for the items generation. But I think it's not good solution. I cannot estimate the exact time for the list generation. Is there better way to execute further testing as long as the values of drop down list have already been generated?
Boyan Boev
Telerik team
 answered on 05 Aug 2013
5 answers
188 views
Hi 
  
We are using ArtOfTest(WebAii) framework. All the testers were working fine and suddenly started failing from past few days with the following error.
Wait for condition has timed out 
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo) 
   at ArtOfTest.WebAii.Core.Manager.WaitForBrowserToConnect(Int32 browserIndexToWaitFor) 
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments) 
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle) 
  
The reason for this error was because of some settings which was globally made on all our machines without our knowledge.
  
Solution:  
  
Allow third-party browser extensions setting in IE should be enabled. 
This setting can be found For IE8 at : IE->Tools->Internet Options->Under 'Advanced Tab'->Under Heading 'Browsing'. 
  
This setting can be added if found valid for everyone @ Configure the Browser 
  
Thanks,
Kiran K N.
Velin Koychev
Telerik team
 answered on 01 Aug 2013
1 answer
105 views
  • Hi Team,
      
    Im Using webaii framework for my automation.
    I have a page in there when we click a button it ll show one pop up. tried this scenerio in webaii with below code.
      
       Manage.ActiveBrowser.Actions.Click(button); 
      
    It clicks the button as expected, but when pop up was thrown by webpage, code flow got stopped it didnt cross the above command.
    Is it any other way to click a element after click, browser should be free and it ready for next command.
Velin Koychev
Telerik team
 answered on 30 Jul 2013
1 answer
141 views

Hi all,

I'm currently using the framework to create performance tests for a WPF application. I need to record the time between when I click on a combo box and when the combo box is actually present. 

I can't see an event that I can attach too that would tell me the combobox was down, you can see if it is down but no event.  

Here's what I mean:

IList<ComboBox> allByType = wpfWindow.Find.AllByType<ComboBox>();
IEnumerable<ComboBox> comboBoxs = allByType.Where(x => x.Text.Contains("Test"));
ComboBox comboBox = comboBoxs.First();
_stopWatch = Stopwatch.StartNew();
  
comboBox.OpenDropDown(true);
//Check to see if drop down is present or fire event
Console.WriteLine("Total dropdown loading time (ms): " + _stopWatch.Elapsed.TotalMilliseconds);


Thanks,

Sara

Velin Koychev
Telerik team
 answered on 29 Jul 2013
3 answers
121 views
When I use the following statement to clear up the cache and cookies
ActiveBrowser.ClearCache(ArtOfTest.WebAii.Core.BrowserCacheType.History);
I get the following exception "Clearing the browser cache is not yet supported for Safari" How do i prevent Safari from saving cookies and not to get this error.
Boyan Boev
Telerik team
 answered on 29 Jul 2013
2 answers
108 views
Hello,

Hopefully a quick question or two regarding working with the RadSplitter/RadPane/RadSlidingZone/RadSlidingPane wrappers of the Testing Framework. From my MSTest script I am attempting to find the appropriate RadControl on the page that will allow me to expand the RadSlidingPane so that the content becomes visible. I have had no success. The following is a snippet of the source code (I believe it should be enough to show what I am working with):

<telerik:RadSplitter ID="RadSplitterActivityPage"
            runat="server"
            Width="100%"
            Height="100%"
            Orientation="Vertical">
            <telerik:RadPane ID="RadPaneFilter"
                runat="server"
                Width="20px">
                <telerik:RadSlidingZone ID="RadSlidingZoneFilter"
                    runat="server">
                    <telerik:RadSlidingPane ID="RadSlidingPageFilter"
                        runat="server"
                        Width="200px"
                        Title="Filter"
                        Scrolling="Y">
                        <telerik:RadAjaxPanel ID="RadAjaxPanelFilter"
                            runat="server"
                            Height="99%">
                            <div style="margin:5px;">
                                <label class="riLabel">Start Date:</label>
                                <br />
                                <telerik:RadDateTimePicker ID="RadDateTimePickerStartDate"
                                    runat="server"
                                    Width="100%">
                                </telerik:RadDateTimePicker>
                                <br />
                                <label class="riLabel">End Date:</label>
                                <br />
                                <telerik:RadDateTimePicker ID="RadDateTimePickerEndDate"
                                    runat="server"
                                    Width="100%">
                                </telerik:RadDateTimePicker>

Etc, etc, etc......

From the Testing Framework API I can see that RadPane and RadSlidingZone wrappers are the only two that have the "Expand" method. I have tried both with no success. So, I assume I am either not "finding" the appropriate element on the page, or in the case of the Expand method for the RadZlidingZone wrapper I am not providing the appropriate value for the "id" parameter.

Can anyone please provide me some guidance? Much appreciated in advance!
Velin Koychev
Telerik team
 answered on 29 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?