Telerik Forums
Testing Framework Forum
3 answers
90 views
I use axwebbrowser before, so i want to change it become webAII, Question does it support mshtml ? so i don't need to change many codes ?

WaTin support MsHTML :), i hope webAII support too.

My codes now :

HTMLDocument Document =  (HTMLDocument)wb.Document;
              HTMLInputElement iptUserName = (HTMLInputElement)Document.getElementById("f_username");
                iptUserName.value = StaticClass.BLI.articlecellUser;

                HTMLInputElement iptPassword = (HTMLInputElement)Document.getElementById("f_password");
                iptPassword.value = StaticClass.BLI.articlecellPass;

                HTMLInputElement iptLogin = (HTMLInputElement)Document.getElementById("B7");
                iptLogin.click();
Cody
Telerik team
 answered on 06 Jan 2011
1 answer
93 views
Hi There

Have the error as attached in the screen and cannot start the recorder.

Please Help

Nick
Cody
Telerik team
 answered on 06 Jan 2011
1 answer
93 views
Hi,

Here is the scenario where i have to search for an element in the combobox.

an element - value being a string.

I am using HtmlSelect control for combobox.
but htmlSelectControl.Option.Contains( "is accepting an HtmlOption ")

how do i convert a string to a HtmlOption object??

Stoich
Telerik team
 answered on 05 Jan 2011
3 answers
76 views
I've used the Dialog(DialogButton.OK) before but I have a question on how to use the DialogAttribute with the IDialog customDialog constructor. 

[TestMethod]
[Dialog(new ConfirmDialog(Manager.Current.ActiveBrowser, DialogButton.OK))]
public void TestCase()
{
     // This gives me an error. "An attribute argument must be a constant expression, typeof expression or array creation                      expression of an attribute parameter type
}

So my question is since attributes require constant expressions for their arguments how does the DialogAttribute work for "Custom" dialog handling?

Cody
Telerik team
 answered on 31 Dec 2010
2 answers
78 views
I am playing around with the framework and I was just wondering why there is a Find.ById() but not a Find.AllByClass<T>() or Find.AllByClass()?

Am I missing something whats the best way to figure something out like this? Should I just create an extension method using some other method?
Stoich
Telerik team
 answered on 23 Dec 2010
1 answer
138 views
Hi,

I am trying to execute the webAii sample test - Helthcaredemo but it is failing(eventhough it is launching IE) with following message:
I am trying to run this from XP having IE6 installed on it.


Test method QuickStarts_VSTS_CS.SilverlightHealthcareSample.HealthCareDemo threw exception:  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.TimeoutException: Wait for condition has timed out.

The stack trace is:
ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Int32 timeout)
ArtOfTest.Common.Win32.WindowManager.Attach(IntPtr& handle, Boolean findTabWindow, Boolean loadClr, IntPtr& hookId)
ArtOfTest.Common.Win32.WindowManager.Attach(IntPtr& handle, Boolean findTabWindow, Boolean loadClr)
ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename)
ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename)
ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle)
QuickStarts_VSTS_CS.SilverlightHealthcareSample.HealthCareDemo() in C:\Program Files\Telerik\WebAii Testing Framework 2010.3\Samples\WebAii Framework\QuickStarts_VSTS_CS\Tests\SilverlightHealthcareSample.cs: line 136

The debug trace is:
[4:01 PM] - Using: ArtOfTest.Common, Version=2010.3.1213.0, Culture=neutral, PublicKeyToken=14a0200bfcbb7b62
[4:01 PM] - OS: Microsoft Windows NT 5.1.2600 Service Pack 3
[4:01 PM] - Locating ArtOfTest.Connector.dll
[4:01 PM] - Loading C:\Program Files\Telerik\WebAii Testing Framework 2010.3\Bin\ArtOfTest.Connector.dll
[4:01 PM] - Loading _HookProc@12
Stoich
Telerik team
 answered on 23 Dec 2010
3 answers
131 views
I'm trying to move from a windows xp build server to windows 7 64bit. We have a set of unit tests that are run via nunit that fire up a browser using webaii and control a sliverlight application and work correctly on the old build server.

When we moved to the new server, the build can fire up the browser and navigate to the right page, but cant click buttons to control the browser and run the tests. The tests work correctly when running from visual studio, resharper unit test runner.

- I'm using webaii version 2010.2.1007
- It is a silverlight 4 application
- I have turned off UAC in windows 7

What if any IE 8 settings should I be checking?
What other things should I be checking?
Cody
Telerik team
 answered on 23 Dec 2010
5 answers
184 views
Hi,
I am using  [Dialog(DialogButton.OK)] in my test method.
using DialogButton.OK i want to click 'OK' in  JavaScript confirm dialog but it always click cancel in JavaScript confirm dialog.When i use 
Manager.DialogMonitor.AddDialog(new AlertDialog(ActiveBrowser, DialogButton.OK));
Manager.DialogMonitor.Start();

it is working fine.Is there any bug in DialogButton.OK

Thanks,
Kumar








Cody
Telerik team
 answered on 21 Dec 2010
1 answer
101 views
Hi!

I would like to share a problem, we experinced recently.

In 2 different tests we have got download file dialogs.

In first test case IE 7 shows Download dialog with "Open", "Save", "Cancel" buttons. And this dialog is handled properly. (see attached file OpenSaveCancel.png)

In other test case IE 7 shows Dowload dialog with "Find", "Save", "Cancel" buttons. And Webaii doesn't handle this dialog at all. (see attached file FindSaveCancel.png)

Our configuration:
Webaii: 2010.2 830
IE7
OS: WinXP

Here is a piece of code which handles both dialogs:

IEDownloadDialog iedownload = new IEDownloadDialog(
    Browser,
    DialogButton.SAVE,
    Manager.Desktop);
 
Manager.DialogMonitor.AddDialog(iedownload);
 
SaveAsDialog saveas = new SaveAsDialog(
    Browser,
    DialogButton.SAVE,
    fname,
    Manager.Desktop);
 
Manager.DialogMonitor.AddDialog(saveas);
 
IEDownloadCompleteDialog iedownloadComplete1 = new IEDownloadCompleteDialog(
    Browser,
    DialogButton.CLOSE,
    Manager.Desktop);
 
Manager.DialogMonitor.AddDialog(iedownloadComplete1);
Manager.DialogMonitor.Start();
 
downloadExcelLink.MouseClick(MouseClickType.LeftClick);

We also tried to write this test using WebUI Test studio Developers edition, but we got the same issue. 

Could you please help us to resolve this issue?
Stoich
Telerik team
 answered on 21 Dec 2010
3 answers
101 views

I’m running into an issue and was wondering if anyone might shed some light on possible solutions I might be missing.  We’re using the framework not as a testing tool but as an entry tool to automate the entry of information into our Silverlight application.  I wanted to mention this as the nature of what we are doing plays into the number of iterations any given task must run through before the set is complete.

The set of commands run successfully for the first 60 – 70 items but at that point WebAii begins to have trouble communicating with Internet Explorer.  After some investigation it appears that at the point of trouble IE’s memory use has ballooned to over a gig.  By doing nothing but logging in and then looping back and forth between two Silverlight URLs in our app I can observe the issue, but attempting the same on other Sites doesn’t seem to recreate it.  For the moment I’m calling Refresh() on the browser as that seems to drop the memory use down to normal levels.

I have a theory on what’s happening and was wanted to see if I may be correct and if so, if there are any better alternatives to simply calling Refresh().  Our application is composed of one XAP file which houses a shell which fills itself with content which is housed in multiple other XAP files.  As I am usually interacting only with one particular section, it is possible that actions are performed on that section and then an action resulting in a navigate is performed while the framework is still busy in the background injecting its connection into other XAPs which the Application is still trying to load.  My guess is that due to the navigate occurring before the framework is really ready that it is forgetting about any connections/objects/etc that it was in the process of constructing and that memory is never reclaimed until IE’s active in-memory cache is cleared by the refresh (or process termination).

I am waiting until the Browser reports ready, and have gone so far as to implement a request/response counter/matcher using the WebAii proxy to supplement Browser ready checks but neither are accurately representing whether the Silverlight application is actually ready with all the sub-components loaded.

Is there a better way to determine Silverlight application readiness?  I’d like to try and avoid performing element find checks to determine module loading as I would like to be able to utilize the same check code everywhere in the app.  If this is problematic, is there a way to tell the framework to clear or otherwise refresh itself or the disconnected objects it may have floating in IE's memory without doing a full browser refresh?

Any insight or help is much appreciated.

Cody
Telerik team
 answered on 20 Dec 2010
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?