Telerik Forums
Testing Framework Forum
14 answers
192 views
I've searched through the forums and google and couldn't find any solution to this, hopefully someone can help.

We're working on testing web content which is to be used within an iPad application.  In order to allow the web content to interact with iOS native content our developers have implemented a custom protocol (i.e. "foo://), which when the native application encounters this it does a particular task described after the protocol. 

My issue here is that I can use the test framework to test the web content in Safari until it encounters this custom protocol.  When it encounters it, Safari displays a browser error of 'Safari can't open "foo://bar/" because Microsoft Windows doesn't recognize Internet addresses starting with "foo:".'  I can't proceed past this, any attempt at accessing the url to trap it just shows the previous page's url, and any attempt to navigate elsewhere afterwards fails with a timeout.

Is there any means to trap the url with the special protocol so I can do something with it, and/or any means to get the framework to tell the browser to navigate elsewhere after it encounters one?

I've put together some sample code to illustrate the problem:

 

Settings testSettings = new Settings();
testSettings.Web.Browser = BrowserExecutionType.Safari;
testSettings.ClientReadyTimeout = 60000;
testSettings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
  
Manager mgr = new Manager(testSettings);
mgr.LaunchNewBrowser(BrowserType.Safari, true);
  
mgr.ActiveBrowser.NavigateTo("http://www.google.com");
System.Threading.Thread.Sleep(5000);
mgr.ActiveBrowser.NavigateTo("foo://bar");
System.Threading.Thread.Sleep(5000);
mgr.ActiveBrowser.NavigateTo("http://www.bing.com");

Safari will not navigate to bing.com and the test will timeout.
Cody
Telerik team
 answered on 01 Feb 2012
2 answers
153 views
Hi

When we started using test framework i remember reading that there were no plans on making it pay to use.

But when i go the "free framework" page now it has a huge link to download the test studio but no apparent link to download the framework, does this mean that soon the framework is no longer free??

http://www.telerik.com/automated-testing-tools/free-testing-framework.aspx
Martin
Top achievements
Rank 1
 answered on 01 Feb 2012
1 answer
132 views
Hi,

I cannot find the right place to download the testing framework now (http://www.telerik.com/automated-testing-tools/free-testing-framework.aspx), can someone help me?

Thanks a lot!
Plamen
Telerik team
 answered on 30 Jan 2012
1 answer
67 views
Hi,

I am testing a website and one of the links is target="_blank". In IE9, this creates a brand new Browser Instance, not a popup. As a result, the following approaches do not work:

1. Manager.Browsers.Count remains equal to one forever (I can test this using long timeouts
2. Wait for IEConnect does not work because the new window is not a popup. It is a new browser.
3. Manager.WaitForNewBrowserConnect(url) does not work. The new browser is not a popup per se, it's a brand new browser window so it does not seem to be associated with ActiveBrowser (like popups are).

So my questions are:

1. In IE9, when I click a target="_blank" and a brand new browser window appears, how do I get hold of it within the Telerik Framework?
2. Can I get hold of an already-running-browser instance that I did not spawn within Telerik?

Thanks for your help!

Grim

Anthony
Telerik team
 answered on 27 Jan 2012
3 answers
374 views

Hello,

I have downloaded the last WEBAII framework (WebAii_Testing_Framework_2010_2_713_FREE_EDITION.msi) and this framework do not behave the same way as the previous one. During the exact same test (no code modification, only the framework update)  I obtain now : 16/07/2010 12:29:11.374 ' - Unexpected dialog encountered. Closing the dialog, and halting execution.

 

It appears when a the IE8 Win32 OpenDialog is displayed (French System so, the title is Ouvrir and so on).

I have tried "manager.DialogMonitor.Stop" but, same error, it closes the dialog directly with this error.

Is there a way to indicate the framework to not monitor this window? It is because I manage this type of window using an external executable to manipulate the different OpenDialog by language.

Thanks & Regards.

-----------------

I have found a way that suit my need at the moment: "mySettings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle"

Regards.

Stoich
Telerik team
 answered on 26 Jan 2012
3 answers
157 views

Hi

I think there's a bug in Teleriks implementation of xpath, if the following snippet is on the page i get a xml error when running a find.

 

<a class="addthis_button_google_plusone" <%="g:plusone:annotation"%>="none"></a>

I'm doing find by expression like seen below:

private

HtmlFindExpression h1 = new HtmlFindExpression("xpath=//h1");

Assert

.IsNotNull(currentTest.Find.ByExpression(h1), "h1 not found");


The same xpath works fine in if using Selenium.


Below is the error message thrown:
The ':' character, hexadecimal value 0x3A, cannot be included in a name.


Workaround:
HtmlFindExpression("tagname=h1");

But i still hope you fix this bug.

 

Martin
Top achievements
Rank 1
 answered on 26 Jan 2012
1 answer
101 views
Hi
How do i use the Framework with VisualStudio2010
Regards
N
Anthony
Telerik team
 answered on 24 Jan 2012
8 answers
325 views

Hi all,

I am getting the following exception after LaunchNewBrowser() is called (IE does get launched):

   System.ApplicationException : Exception thrown attempting to launch Internet Explorer. Please make sure Internet Explorer is properly installed and you are able to launch it.
  ----> System.NullReferenceException : Object reference not set to an instance of an object.
   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()
   at YuntuMerchantUITest.YunTuAutomationBVT.AccountInfoBVT()
--NullReferenceException
   at ArtOfTest.Common.Win32.WindowManager.Attach(IntPtr& handle, Boolean findTabWindow, Boolean loadClr, IntPtr& hookId)
   at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename)

I've seen similiar posts in the forum and have already done the following:
1. disabled UAC in server management tools
2. compile for x86.
3. loading the test dll using Nuit's x86 exe
4. change all IE security settings to align with the guide from WebAii.

Code:
Manager m = new Manager(false);
m.Start();
m.LaunchNewBrowser();

Environment:
IE8, version 8.0.7600.16385
Windows Server 2008 R2, 64bit

Same exact code runs perfectly fine my Win7 32bit machine. Same IE version and security settings. This leads me to believe it's a 32bit/64bit issue, however from TaskManager, the iexplorer.exe process has a *32 after it (which means it's a 32bit process).

Any insights? I am pretty much all out of ideas right now.

Thanks...
Xin

Saket
Top achievements
Rank 1
 answered on 23 Jan 2012
3 answers
468 views
Here is a scenario as below:
I want to know whether the element exists, if exists, the test will execute some codes, if not exists, test will execute other codes.
Now, I use find to get the element, but if it does not exist, an exception with "Element not found"  throws, and so left codes will not be executed.
So please give me some hlep to handle this situation, Thanks!! 
Plamen
Telerik team
 answered on 19 Jan 2012
6 answers
244 views
Using: ArtOfTest.WebAii.dll 2011.2.1108.0.
Windows 7 x64 / VS2010 / Mstest / Silverlight 4.

Calling FrameworkElement.Refresh() according to doco is meant to 'refresh this framework element within the visualtree'.  This works fine when the element is part of the main application's visual tree, however seems not to work when the element is part of a popup / child window visual tree. 

Attached is a minimal test project to repro the issue.  It has two unit tests, 1 passes (for a control on the main visual tree) and 1 fails (for the same control on a child window). 

Can you please confirm if this is a bug, or otherwise what I am doing wrong?

Thanks.
Plamen
Telerik team
 answered on 17 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?