Telerik Forums
Testing Framework Forum
3 answers
154 views
Good Morning,

I am evaluating several versions of the Test Studio automation tool, QA Edition, TS Express and also using the testing framework directly from Visual Studio.

Currently I am receiving an exception error when calling the Manager.LaunchNewBrowser() command from my sample program.

This only occurs when I launch IE9 as Firefox works fine.

Here is the log from Visual Studio:

Uncategorized: DialogMonitor.Start() : Using: ArtOfTest.WebAii, Version=2011.1.712.0, Culture=neutral, PublicKeyToken=4fd5f65be123776c
Uncategorized: DialogMonitor.Start() : OS: Microsoft Windows NT 6.1.7601 Service Pack 1
DialogPlayback: DialogMonitor.Start() : Beginning monitoring for dialogs from the set {}.
UIAutomation: AutomationExtensions.AddAutomationEventHandler() : Added a(n) WindowPatternIdentifiers.WindowOpenedProperty handler on element System.Windows.Automation.AutomationElement scope Descendants.
Framework: Manager.get_ActiveBrowser() : The current ActiveBrowser is either invisible or disconnected.
Framework: InternetExplorerActions.LaunchNewBrowserInstance() : Process launched (ID=1328, Path="C:\Program Files\Internet Explorer\iexplore.exe", Arguments="-nomerge about:blank").
Framework: InternetExplorerActions.LaunchNewBrowserInstance() : Attempting to attach on IE frame (HWND=133176)...
Error: RegistryConstants.GetRegistryRoot() : Unable to open key HKLM\SOFTWARE\Telerik
A first chance exception of type 'System.ApplicationException' occurred in ArtOfTest.WebAii.dll

Also, here is a code sample from my simple program..

Sub Main()
 
    Dim webSettings As Settings.WebSettings = New Settings.WebSettings()
    Dim mySettings As Settings = New Settings(webSettings)
    Dim mgr As Manager = New Manager(mySettings)
 
    mgr.Start()
 
    mgr.LaunchNewBrowser(BrowserType.InternetExplorer)
 
    mgr.ActiveBrowser.NavigateTo("www.google.com") '-- this url is an example and not the one I am using...
 
    Dim mybtn As Element = mgr.ActiveBrowser.Find.ByAttributes("type=submit")
 
    mgr.ActiveBrowser.Actions.Click(mybtn)
 
    mgr.Dispose()
 
End Sub

I've tried many variations of this setup including various options in settings and changing how the browser is called.

Please help!!

Thank you
Craig
Konstantin Petkov
Telerik team
 answered on 01 Aug 2011
1 answer
74 views
I have a test which clicks a RadRibbonButton on a RadRibbonView:

var button = app.Find.ByAutomationId("MyButton");
//Thread.Sleep(3000);
button.User.Click();

It only works if I uncomment the Thread.Sleep and that only works if its more than 2000.

Am I doing something wrong?

Thanks,
Jon
Plamen
Telerik team
 answered on 29 Jul 2011
8 answers
141 views
Hi guys,

I have a console app that uses the latest WebAii (2011_1_609) to start IE9 and navigate to a URL. At the same time, I'm using FiddlerCore (Fiddler's class library) to act as a HTTP proxy so I can monitor the traffic. This works quite well.

However, for some URLs (not all), I’m seeing a delay after the entire page has loaded, i.e. it takes the .NavigateTo method about 5-10 extra seconds after the last HTTP request in the page to observe that the browser has finished loading. During this delay, nothing is happening on the network, and the browser is not loading any other requests. ProcMon shows no activity during this time either (either in IE or my app). On my test server (Win Server 2008 R2) I can reproduce this behavior 100% for certain URLs, when the browser's cache is empty.

When I disable my FiddlerCore functionality, these delays are not observed. In order to figure out what is actually causing the delay, I'd like to understand more about what WebAii is using in the .NavigateTo method to determine that the browser is "finished". I appreciate any insight in this matter. Thank you very much in advance.

Regards,
JP
Jean-Pascal van der Endt
Top achievements
Rank 1
 answered on 29 Jul 2011
15 answers
216 views
got exception:
Exception thrown attempting to launch Internet Explorer. Please make sure Internet Explorer is properly installed and you are able to launch it. Also make sure that WebAii Test Execution client is properly installed. Check Tools->Manage Add-ons.
13/12/2010 1:52:52 PM--   at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename)
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser()

try the old version 2010.2.830 ... can see the add-on mscoree.dll

but with version 2010.3.XXX , the add-on is gone.

please help for the issue.
John
Top achievements
Rank 1
 answered on 29 Jul 2011
1 answer
194 views
Hello,

I'm using vs2010 
Webaii 2011.1.502.0
Windows 7

situation:
In my testscenario I launch an WPF app and then Login
after the login the app is minimized to the system tray as an Icon.

Question:

How can I get access to the menu of our app in the system tray? 
And how can I activate a menu item?

Thanks,

Werner
Anthony
Telerik team
 answered on 27 Jul 2011
1 answer
256 views
I'm using the latest Telerik WebAii Testing Framework (2011_2_712). Our automation code uses ActiveBrowser.Capture to capture an
image of the browser if the test fails. Our automation uses multiple windowless clients VMs (Windows Server 2008 R2 Standard).
If I remote desktop into these VMs to view the browser window while tests are running, ActiveBrowser.Capture works fine and produces the correct image. However, if I do not remote desktop into the machine and ensure that the browser running the tests is visible, or minimize the remote desktop window, then a black image is always produced.  I even tried doing multiple calls to ActiveBrowser.Capture  with a 1 sec delay between them as recommended by some posts and saving the image into different formats (jpeg, gif, bmp, png) but they all produced black image.

I saw many posts regarding this problem and it is due to older versions of WebAii framework using the Windows screenshot to capture an image and that requires the browser to be visible. I thought that the latest release fixed that, but apparently not.

Here is the code I'm using:
                ActiveBrowser.Window.SetActive();
                ActiveBrowser.Window.SetFocus();
                System.Drawing.Bitmap browserImage = ActiveBrowser.Capture();
                if (browserImage != null)
                {
                    var fileName = TestCaseName + "_" + DateTime.Now.ToString("MM_dd_yyyy_HH_mm_ss_ffff");
                    fileName = Path.ChangeExtension(Path.Combine(directory.FullName, fileName), ".png");
                    browserImage.Save(fileName, ImageFormat.Png);
                }

Is there any other suggestions I can do to make this work? Keeping active Remote Desktop Connections to each client VM is not an option. I've attached a sample image of the black capture of browser.
Thanks for any help you can provide.
Cody
Telerik team
 answered on 27 Jul 2011
3 answers
127 views
Hello,

I am getting stuck while trying to get handle a Download Dialog in IE 8.

My scenario is:
. Lauching a web app1.
. From that, clicking on an Anchor, it will launch another browser with a Download Dialog displayed there.

I found out that most the examples and cases around this forum just mentions the Anchor to fire the Download Dialog inside the web app1 only, but my case is pretty difficult since it was automatically launched from another browser (I had 2 browsers after clicking on the Anchor on the web app1)

Does anyone have any idea to help me out?

Regards,
San

What I've tried:

try
        {
            Utilities.GlobalObject.BROWSER = Utilities.GlobalObject.MANAGER.ActiveBrowser;
             
            HtmlAnchor cphPageContent_btnExport = Utilities.GlobalObject.BROWSER.Find.ByAttributes<HtmlAnchor>("href=trend_charts.aspx?output=xls");
            cphPageContent_btnExport.Click();
            Utilities.GlobalObject.BROWSER.WaitUntilReady();
            Utilities.GlobalObject.BROWSER = Utilities.GlobalObject.MANAGER.ActiveBrowser;
            DownloadDialogsHandler handler = new DownloadDialogsHandler(Utilities.GlobalObject.BROWSER, DialogButton.SAVE, saveLocation, Utilities.GlobalObject.MANAGER.Desktop);
            handler.WaitUntilHandled(20000);
        }
        catch (Exception EX)
        {
            string strE = EX.ToString();
            Utilities.GlobalObject.LOGGER.log(strE);
        }
Cody
Telerik team
 answered on 25 Jul 2011
1 answer
90 views
Hi,

I've installed the Telerik testing framework and opened one of the test projects "XamlSampleTests" in VS2010. It compiles successfully. When i run it all the tests fail. The first one it runs is the WindowStateTest it fails on this line.
Assert.IsTrue(window.IsOpen, "The window should be initially opened!");

It throws an exception that the assert failed. I can't figure out how it failed. I'm able to see the IE open and access the test website. I've also tried to run VS2010 under administrator account. That doesn't work either. Are there any prerequisites for running the test program?

Also i had to remove the ArtOfTest.Common dll from the references in order to compile the program successfully. I was not able to find the dll in the framework installer package.

Thanks. Regards,
Arooj
Boyan
Telerik team
 answered on 25 Jul 2011
2 answers
196 views
I'm trying to use WebAii to automate tests with Silverlight. I've installed the framework, but can't find this dll. Where is it?

Also, is there any documentation on how to use the wrappers?

Thanks
Plamen
Telerik team
 answered on 25 Jul 2011
11 answers
91 views
Hello

to reproduce use this code:
var actions = Manager.Current.ActiveBrowser.Actions;
actions.InvokeScript("window.my_list=[1,2,3]");
var list = actions.InvokeScript<IList>("window.my_list"); // here

In IE and FF3: object[3] { 1, 2, 3}
In FF4: empty array object[0]

Fix please

Cody
Telerik team
 answered on 20 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?