Telerik Forums
Testing Framework Forum
1 answer
126 views
Hello,

I have a test plan where we need to test a downloading process. Can telerik automation tool handle this case? if yes how does it deal with browser default dialogues;ie, (download) .

Actually, Telerik stuck at this step and is unable to detect the browser dialogue.

I need to know how can I interact with the browser download dialog (ie, firefox, etc....) like the one shown in the attachment:
1) to know that the dialog indeed is shown and the file is prompted for download
2) to execute the actions on that dialog (Save, Open,Cancel) regardless of the target browser, at least for the known ones (IE, Firefox).
3) to detect the filename to be downloaded if possible.

I have tried many solutions that i found in forums, but none of them seem to work.

Ex :
Manager.Desktop.KeyBoard.KeyPress(Keys.Enter);
 
Window cancelButton = WindowManager.FindWindowRecursively(dialog.Window.Handle, "Cancel", false, 0);
manager.Current.Desktop.Mouse.Click(MouseClickType.LeftClick, cancelButton.Location);

Thanks in advance for your help.
Cody
Telerik team
 answered on 28 Oct 2010
1 answer
103 views
Hello

I've a problem. I use WebAii to test aplication www. Aplication is build from Telerik's controls. My problem relating to RadWindow.
Three textBox are in RadWindow. I use this command:

elem = radWindow1InnerFrame.Find.ById("ctl00_ctl00_cphContent_cphContent_cd1_NameTexBox_text");
 
radWindow1InnerFrame.Actions.SetText(elem, "exampleText ");

In this moment test is finish.
"exampleText" is in Control, I think that all is ok, but when I click in this textBox - "exampleText" disappear.
I can't make next test. Somebody knows what can I do ?
Cody
Telerik team
 answered on 25 Oct 2010
1 answer
89 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
156 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
129 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
284 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
99 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
129 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
67 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
104 views
Hi Nelson,

How to select a drop down in pop ups
Kumar
Top achievements
Rank 1
 answered on 13 Oct 2010
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?