Telerik Forums
Testing Framework Forum
10 answers
421 views

Hi, I am trying to automate file upload function in our application. The application handles both silverlight drag drop upload and also normal file select dialog upload. I am trying to automate without using silverlight. The code is below.

HtmlInputFile fileUpload = ActiveBrowser.Find.ByName<HtmlInputFile>("documentFileInput");

 

 

Assert.IsTrue(fileUpload != null);

 

fileUpload.Upload("C:\\folder1\\folder2\\worddoc.docx, 6000");

 


When this code is executed, I see the upload dialog box appears but the file path is not typed in the text box on the dialog, and it closes itself and I get a timeout error at the last line.

Is there any other code that needs to be written here to handle the dialog box and write complete file path in there and to click open button?
Thanks

 

 

 

 

 

Ivaylo
Telerik team
 answered on 08 Apr 2014
2 answers
186 views
Hi,

I have a scenario where there is Add New user and Edit User PopUp.  Both contains the same elements. I am able to identify the elements which are present in Add New PopUp but the same element I am not able to identify in Edit User PopUp. ID remains same for both.

After consulting with the developer I came to know both are having the same view so ID and all the other attributes remains the same.  Please let me know how to identify the elements in such scenarios.

Thanks
Vishal
Ivaylo
Telerik team
 answered on 07 Apr 2014
10 answers
135 views
Hello,

I created some code that handles a Confirmation (OK / CANCEL) and an Alert (OK) in IE and Chrome.

However, running in FireFox it just hangs on the alerts. 

Any suggestion for how to handle the alerts in FireFox?

Thanks,
Matt
Cody
Telerik team
 answered on 04 Apr 2014
3 answers
68 views
Hi,

Frames test that comes together with your framework (%program files%\Telerik\Test Studio\Samples\Testing Framework\QuickStarts_NUnit_CS\Tests\Frames.cs) fails on machine with IE9 and Windows 7 (32-bit) with the following error:
QuickStarts_NUnit_CS.Frames.FramesAction:
System.NullReferenceException : Object reference not set to an instance of an object.
 
at QuickStarts_NUnit_CS.Frames.FramesAction() in c:\Program Files (x86)\Telerik\Test Studio\Samples\Testing Framework\QuickStarts_NUnit_CS\Tests\Frames.cs:line 138

Latest WebAii version is used - 2013.2.1327.0

The same tests passes on IE11 and Windows 8.1

Konstantin Petkov
Telerik team
 answered on 04 Apr 2014
5 answers
98 views
I am currently using Testing Framework with Firefox 28.0.  I have noticed that the ActiveBrowser.Wait... functions slow page load considerably.  I frequently get the error, "Document is not ready to retrieve its markup."  The only way I could consistently avoid this error when I needed to wait for an element was to first call ActiveBrowser.WaitUntilReady(), and then call  ActiveBrowser.WaitForElement(...) to wait for the element I was actually looking for.  I needed a high timeout on the WaitForElement(...) call, also. 

Is there a better way to avoid this problem?  I can switch to a different browser if that would help.
Cody
Telerik team
 answered on 02 Apr 2014
1 answer
136 views
Hi,
    I am trying to implement the automation for a wps application. But encounter an issue that I can not click the item on the popup menu whick appears after rightclick an item.
    Below is my script:
          wpfApp.Manager.ActiveApplication.MainWindow.Find.ByTextContent("专题列表").User.Click(MouseClickType.RightClick, 250, 77, OffsetReference.TopLeftCorner, ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0)));
    After this step, I will click the item "添加专题" like below statement
          wpfApp.Manager.ActiveApplication.MainWindow.Find.ByTextContent("添加专题").User.Click(MouseClickType.LeftDown, 70, 29, ArtOfTest.Common.OffsetReference.TopLeftCorner,ActionPointUnitType.Percentage,((System.Windows.Forms.Keys)(0)));
    But it is failed. the item "添加专题" can not be clicked.
Ivaylo
Telerik team
 answered on 02 Apr 2014
1 answer
149 views
I Have been assigned Telerik Test Studio Runner Licence by the client.Where in Test Scripts on remote machine can be run on my machine. I followed the following steps for installation and Configuration setup.

1. Downloaded the TestStudio_2013.2.1327_Runtime.msi file
2. Installed the TestStudio_2013.2.1327_Runtime.msi
3. Created the Sheduling server
4. Created an Execution Server
5. ​Created a Test List
6. Connected  to the Scheduling Server
7. Run List Remotely

I got an error on the remote machine , when i tried to give Run command  from the Remote machine. The snapshot of the error Please Find for the snapshot of the error in the Attachment.
Velin Koychev
Telerik team
 answered on 28 Mar 2014
3 answers
145 views
Hi,

I am trying to automate a .aspx page which is using Telerik controls. Few controls in this page are not being identified by Visual studio test manager. So I have been suggested to install Telerik testing framework. Now that I installed the framework, for starters like me, can you please let me know how this is used to build automated tests. How can we use this to identify the Telerik controls on .aspx page.

Please see attached screenshots showing button and dropdown are not identified as themselves. They are being recognized as something else by VS test manager. Can this framework be helpful to identify such objects and work on them?

Boyan Boev
Telerik team
 answered on 28 Mar 2014
6 answers
470 views
Currently I am using Framework version 2013.2.1210.0 and I am having a problem capturing images of our application.

I have tried on multiple control elements and get an image exactly correct in size but white. I went right to the top of the stack and captured the Wpf Window using Manager.Log.CaptureWindow() and this gave me a screenshot of the application but displayed all white except the windows title bar which was in full colour and included the minimise/expand/close buttons. I did also try Manager.Log.CaptureDesktop() which did get the image of the application along with the desktop however this is no good to me at this level as I am trying to do some image comparison/verification of a single element.

I have tried the following with the same white image the same size as the control trying to be captured 
myControl.Capture()
Window.GetBitmap(myControl.GetScreenRectangle)

What could be happening to cause none of the application top be captured?
Velin Koychev
Telerik team
 answered on 26 Mar 2014
4 answers
324 views
Hi all,
I'm trying to create UI automation test for my silverlight app and I have a problem.
There is ItemsControl with VirtualizingStackPanel where I show some items.
Firstly the ItemsControls contains 40 items and then I use search that limits the number of items.
But when I look the property "Children" of VirtualizingStackPanel it still has 40 elements.
I tried to call the method "Refresh" (of the virtualizing stack panel).
Tried to call App.RefreshVisualTrees().
But nothings helps.
I'm sure that the tree contains only 1 element (I see it using XAML Spy).
But VirtualizingStackPanel still has 40 elements.
Does anybody know some way to force "true"-refresh?

The version I currently use: 2013.2.1327.0

Thanks in advance for any help,
Artem
Boyan Boev
Telerik team
 answered on 20 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?