Telerik Forums
Testing Framework Forum
1 answer
72 views

I am using IE8, VS 2010, Silverlight app for our application. Also using webAii framework 2010.2.927.
I am trying to use the below code provided by telerik admin for file upload dunctionality. I am not able to define a new windows object and I get compilation error: The type or namespace name 'Window' could not be found are you missing an assembly reference?
I am not able to use the assembly artoftest.webaii.win32.window in this version. Is this a bug or have you changed the assembly?
Is there an alternative to this code to handle the fileupload dialog? Please help.

Window w = WindowManager.FindWindowRecursively(IntPtr.Zero, "Upload", true, 1000);
w.SetFocus();
w.SetActive();
app.Desktop.KeyBoard.SendString("MyFilePath");
ArtOfTest.WebAii.Win32.
 
Button openButton = new ArtOfTest.WebAii.Win32.Button(w.Handle, "Open", true);
openButton.Click();

Thanks

Shwetha

Cody
Telerik team
 answered on 25 Oct 2010
5 answers
128 views
I have been trying to automate a full regression test of our silverlight based website, however there are some areas that I can't seem to automate.

One of the main areas has been when I need to import a file to the site (xml, csv) and need to select from a MS 'Open' window.  WebUI doesn't seem to like recording actions when I use this area.

Can anyone help...point me in the right direction.

Thanks
Adam
Cody
Telerik team
 answered on 25 Oct 2010
1 answer
104 views
Hi,
I am not able to find the elements within a pop up window. I think this is a RadWindow and part of the source of the pop up is a RadWindow (see attached). However, the RadWindow frame has no tangible HTML elements (also in the attached).

Any help would be appreciated.
Kumar
Top achievements
Rank 1
 answered on 22 Oct 2010
8 answers
246 views
Hi Guys, 

Is the right code to be used for file uploading in a non-silverlight env ? 
Manager.ActiveBrowser.Find.ByTagIndex<HtmlInputFile>("input", 0).Upload
              (Path.Combine(Globals.PATH_TO_PAGES, @"..\SupportFiles\EmptyTextFile.txt"), 5000);

I getting an IDE error message for both 'Combine' and 'Globals'...
Am I'm missing a ref etc ?

Ta, 
Seth. 
Limu
Top achievements
Rank 1
 answered on 21 Oct 2010
1 answer
81 views
Hi.

What automation property do I use to set the value of a RadNumericUpDown?

I have tried using "new AutomationProperty("Value", typeof(double?));" but it expects a value of type "Nullable" and simply declaring a variable of "double?" does not work.

Thanks in advance if anyone can help.

Regards
Frank
Cody
Telerik team
 answered on 13 Oct 2010
1 answer
108 views
Hi,
I am using webaii framework visual studio 2010.I am not using webUI .

Scenario: We have a login screen where we need to pass different username and password from Excel.Below is my code:
 [DeploymentItem("Spaxassignment\\kumarEditagain.xlsx"), DataSource("System.Data.Odbc", "Dsn=Excel Files;dbq=|DataDirectory|\\kumarEditagain.xlsx;defaultdir=C:\\Program Files\\Telerik\\WebAii Testing Framework 2010.2;driverid=1046;maxbuffersize=2048;pagetimeout=5", "Sheet1$", DataAccessMethod.Sequential), TestMethod]
        public void ApplicationTab()
        {           
            Settings mySettings = new Settings(BrowserType.InternetExplorer, @"D:\Spax\Log\");
                   Manager myManager = new Manager(mySettings);
                      myManager.Start();
            myManager.LaunchNewBrowser();
            myManager.ActiveBrowser.ClearCache(ArtOfTest.WebAii.Core.BrowserCacheType.Cookies);
            myManager.ActiveBrowser.NavigateTo("http://10.10.208.110/Cockpik/login.aspx");
            HtmlForm form = myManager.ActiveBrowser.Find.ByName<HtmlForm>("form1");
            HtmlInputText usernamefield = form.Find.ById<HtmlInputText>("txtUsername");
            HtmlInputPassword passwordField = form.Find.ById<HtmlInputPassword>("txtPassword");
            HtmlInputSubmit submit = form.Find.ById<HtmlInputSubmit>("Button1");
            string Username = TestContext.DataRow["Username"].ToString();
            string Password = TestContext.DataRow["Password"].ToString();
            usernamefield.Text = Username;
            passwordField.Text = Password;
            submit.Click();
}

By executing the above code   browser opens for every set of username and password because for each iteration a new manager instance is creating and navigating to the site.
My requirement is for the first time browser should open and for the remaining Iterations the same browser should be used. 
Please Let me know the solution.

Thanks
Kumar

 
Cody
Telerik team
 answered on 13 Oct 2010
1 answer
46 views
Hi guys,
OK, so I've given up attempting to use the test recorder - it seems to be just too flaky for any costructive use, so I've gone back to manually coding up tests, and have run into yet another problem....

We have a standard asp.net web app using frames. In one frame we have a "Dashboard" and in another we have a menu - both of which are silverlight controls. There are also several "preceding" frames which just contain normal html. I'm able to drive the login portion of our app correctly and log in to the sysytem, but when using the following code, I'm consistently getting the error mentioned in the title:

            HtmlAnchor a = this.manager.ActiveBrowser.Find.ByContent<HtmlAnchor>("LoginLink");
            if (null != a)
            {
                a.Click();
            }
            this.manager.ActiveBrowser.WaitUntilReady();
            this.manager.ActiveBrowser.RefreshDomTree();

            // 0 in list...
            SilverlightApp app = this.manager.ActiveBrowser.SilverlightApps()[0];




Any ideas? I'm guessing that it's due to the additional frames - I've managed to get the following:

            
            Browser b = this.manager.ActiveBrowser.Frames["Menu"];

To work, but the returned Browser object seems not to be quite the same as a "normal" browser, and so still can't find any SL apps...

Anyone?
Cody
Telerik team
 answered on 13 Oct 2010
2 answers
85 views
Hi Nelson,

How to select a drop down in pop ups
Kumar
Top achievements
Rank 1
 answered on 13 Oct 2010
1 answer
127 views
Hi.

I am using WebAii to automate the testing of a Silverlight web app.

I have a RadGridView; in this grid there are 10 cells, but only 6 cells are visible to the client due to the size of the columns.  You need to use the scroll-bar to view the remaining 4 cells.

With WebAii, I can only find the 6 cells that are in the visual tree, and since Telerik grids use cell recycling, WebAii is not aware that there are another 4 cells in the grid.

How can I access these remaining 4 cells?

Cody
Telerik team
 answered on 12 Oct 2010
1 answer
87 views
Hi, 
I'm currently running my tests using FF 3.0.19 and Nunit. 
Should I upgrade to the current FF version, would that have any effect on the already installed Webaii 2.0 ? 

In addition, do you guys know of a way to handle FF crashes ? When FF goes down I'm getting the attached message. 
I was wondering if there's a way to catch those exception. 

Ta. 
Cody
Telerik team
 answered on 12 Oct 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?