i have a test that run great.
simply, for on e step i do customize step in code , run , and the test doesn't work.
error on the step:
Exception thrown executing coded step: '[DNN_TEST_NB_OF_CLAIMS__UYW1_CodedStep] : Click 'DnnCtr911NewParameterBtnOkImage''
25 Answers, 1 is accepted
Can you share the test log along with the step code? Thanks!
All the best,
Konstantin Petkov
the Telerik team
the log :
Overall Result: Fail
--------------------------------------------------
'8/10/2010 12:58:19 PM' - 'Pass' : 1. Navigate to : 'http://192.168.1.5/nasdnn_latest/'
'8/10/2010 12:58:21 PM' - 'Pass' : 2. Click 'DnnDnnLOGINCmdLoginLink'
'8/10/2010 12:58:21 PM' - 'Pass' : 3. Set 'DnnCtrLoginLoginDNNTxtUsernameText' text to 'host'
'8/10/2010 12:58:22 PM' - 'Pass' : 4. Keyboard (KeyPress) - Tab (1 times) on 'DnnCtrLoginLoginDNNTxtUsernameText'
'8/10/2010 12:58:22 PM' - 'Pass' : 5. Set 'DnnCtrLoginLoginDNNTxtPasswordPassword' text to 'host123'
'8/10/2010 12:58:24 PM' - 'Pass' : 6. Click 'DnnCtrLoginLoginDNNCmdLoginSubmit'
'8/10/2010 12:58:55 PM' - 'Pass' : 7. Click 'PortfolioSpan'
'8/10/2010 12:59:03 PM' - 'Pass' : 8. Click 'DnnCtr911NewParameterUWYearBtnShowTreeSubmit'
'8/10/2010 12:59:08 PM' - 'Fail' : 9. [DNN_TEST_NB_CLAIMS__UYW2_CodedStep] : RadTreeNode('dnn_ctr911_NewParameter_UW Year_radTree'): 'All' action -> 'Expand'
--------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[DNN_TEST_NB_CLAIMS__UYW2_CodedStep] : RadTreeNode('dnn_ctr911_NewParameter_UW Year_radTree'): 'All' action -> 'Expand''.
InnerException:
System.TimeoutException: Wait for condition has timed out
at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
at ArtOfTest.Common.WaitSync.For[T,V](Func`3 func, T target, V custom, Boolean invertCondition, Int32 timeout)
at ArtOfTest.WebAii.Synchronization.Wait.ForCondition(Func`3 condition, Boolean invertCondition, Object custom, Int32 timeout)
at ArtOfTest.WebAii.Synchronization.Wait.ForExists(Int32 timeout, Boolean refreshElement)
at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get(HtmlFindExpression expr, Boolean waitOnElement, Int32 timeout)
at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get(HtmlFindExpression expr)
at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get[TControl](HtmlFindExpression expr)
at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get[TControl](String[] clauses)
at TestProject21.Pages.PortfolioPage.get_ListItem() in c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Project.cs:line 174
at TestProject21.DNN_TEST_NB_CLAIMS___UYW2.DNN_TEST_NB_CLAIMS__UYW2_CodedStep() in c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\DNN TEST NB CLAIMS - UYW2.aii.cs:line 77
--------------------------------------------------
'8/10/2010 12:59:09 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
--------------------------------------------------
'8/10/2010 12:59:09 PM' - Overall Result: Fail
--------------------------------------------------
This looks like a typical test that needs some verification check points in order be able to execute correctly. Can you please insert a WaitFor Visible check as step 9 before the expand action? You can find this approach described in this video we highly recommend.
Regards,
Konstantin Petkov
the Telerik team
I look into the video that you propose and I added some controls validations. thank you.
what's happen i s the following scenario:
my test go well. for one specific step I do: customize in code. run => failure !
I didn't make any modifications, simply customize code.
check the attached file plz.
hereafter the error:
Overall Result: Fail
--------------------------------------------------
'8/10/2010 4:04:35 PM' - 'Pass' : 1. Navigate to : 'http://192.168.1.5/nasdnn_latest/'
'8/10/2010 4:04:36 PM' - 'Pass' : 2. Click 'DnnDnnLOGINCmdLoginLink'
'8/10/2010 4:04:37 PM' - 'Pass' : 3. Set 'DnnCtrLoginLoginDNNTxtUsernameText' text to 'host'
'8/10/2010 4:04:38 PM' - 'Pass' : 4. Keyboard (KeyPress) - Tab (1 times) on 'DnnCtrLoginLoginDNNTxtUsernameText'
'8/10/2010 4:04:38 PM' - 'Pass' : 5. Set 'DnnCtrLoginLoginDNNTxtPasswordPassword' text to 'host123'
'8/10/2010 4:04:40 PM' - 'Pass' : 6. Click 'DnnCtrLoginLoginDNNCmdLoginSubmit'
'8/10/2010 4:05:13 PM' - 'Pass' : 7. Click 'PortfolioSpan'
'8/10/2010 4:05:25 PM' - 'Pass' : 8. Verify element 'DnnCtr911NewParameterUWYearBtnShowTreeSubmit' 'is' visible.
'8/10/2010 4:05:33 PM' - 'Pass' : 9. Click 'DnnCtr911NewParameterUWYearBtnShowTreeSubmit'
'8/10/2010 4:05:50 PM' - 'Pass' : 10. Verify element 'Span_0' 'is' visible.
'8/10/2010 4:05:58 PM' - 'Pass' : 11. Desktop command: LeftClick on Span_0
'8/10/2010 4:06:11 PM' - 'Pass' : 12. RadTreeNode('dnn_ctr911_NewParameter_UW Year_radTree'): 'All' action -> 'Expand'
'8/10/2010 4:06:18 PM' - 'Pass' : 13. RadTreeNode('dnn_ctr911_NewParameter_UW Year_radTree'): 'All' action -> 'Expand'
'8/10/2010 4:06:35 PM' - 'Pass' : 14. Verify element 'Div' 'is' visible.
'8/10/2010 4:06:40 PM' - 'Fail' : 15. [DNN_TEST_NB_CLAIMS__UYW__with_highlihting_test__AND_CONTROLS1_CodedStep] : Verify 'TextContent' 'Contains' '2003' on 'x2003Span'
--------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[DNN_TEST_NB_CLAIMS__UYW__with_highlihting_test__AND_CONTROLS1_CodedStep] : Verify 'TextContent' 'Contains' '2003' on 'x2003Span''.
InnerException:
System.TimeoutException: Wait for condition has timed out
at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
at ArtOfTest.Common.WaitSync.For[T,V](Func`3 func, T target, V custom, Boolean invertCondition, Int32 timeout)
at ArtOfTest.WebAii.Synchronization.Wait.ForCondition(Func`3 condition, Boolean invertCondition, Object custom, Int32 timeout)
at ArtOfTest.WebAii.Synchronization.Wait.ForExists(Int32 timeout, Boolean refreshElement)
at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get(HtmlFindExpression expr, Boolean waitOnElement, Int32 timeout)
at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get(HtmlFindExpression expr)
at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get[TControl](HtmlFindExpression expr)
at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get[TControl](String[] clauses)
at TestProject21.Pages.PortfolioPage.get_x2003Span() in c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Project.cs:line 258
at TestProject21.DNN_TEST_NB_CLAIMS___UYW___with_highlihting_test___AND_CONTROLS_1_.DNN_TEST_NB_CLAIMS__UYW__with_highlihting_test__AND_CONTROLS1_CodedStep() in c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\DNN TEST NB CLAIMS - UYW - with highlihting test - AND CONTROLS(1).aii.cs:line 77
--------------------------------------------------
'8/10/2010 4:06:40 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
--------------------------------------------------
'8/10/2010 4:06:40 PM' - Overall Result: Fail
--------------------------------------------------
Hi,
In fact, let me explain my main issue, and I appreciate if you can help me:
My goal is, for the filter that I’m clicking, instead of clicking on 2003 or 2004…etc, I want to read this from the local data. That’s why in my test record, using the highlighting control I am testing the content of the row so I could changed it in the code to read from the local data. Hope I was clear.
(P.S: by the way when I’ recording, telerik make the website very very slowely)
thx a lot
I am sorry but it appears you have hit a known bug for Wait For steps that have been converted to code (your step 15 that's failing). This bug was fixed last week in our latest internal build.
As for using data driven testing to perform verifications I've attached a document that describes exactly how to do that. Basically the approach is to define your verification using a fixed value and then modify the expected text property to bind it to a particluar column from your data source. The document shows you how to do this.
It doesn't talk about how to access data in code. You do that easily with code similar to this:
string
date = Data[
"year"
].ToString();
In this example "year" refers to the column named "year" in your data source. The variable date will get the value of the "year" column from your datasource.
Let me know if you have further questions.
Regards,
Cody
the Telerik team
I already have the latest version (2010.2.713.0) !
otherwise, I look into your document, it's great, but what I meant by data driven is the data that I put in the local test data (you know the button near the storyboard). I don't need to put my data in XLS sheet for the time being, just to put in as i told you in the local test data. and then use it in the steps. how can i do this?
thank you a lot
The latest internal build includes a bunch of improvements compared to the official Q2 release you mentioned. The latest build is labeled 2010.2.806 and available for download from the page Cody pointed you to. Please give it a go and let us know whether it helps resolve the Firefox issue.
As to the data-driven testing with the built-in grid, please check this video. I hope this helps!
Best wishes,
Konstantin Petkov
the Telerik team
Then my fault, sorry! Here is the link to the Automated Testing Tools LIB page:
http://www.telerik.com/automated-testing-tools/account/downloads/internal-builds.aspx
Regards,
Konstantin Petkov
the Telerik team
When I try to sue the latest version (after downloading it) a licence error occurs (attached).
About the license error can you try to uninstall and install the QA edition again.
Also did you use "Manual" or "Automatic" activation ?
Nikolai
the Telerik team
i uninstall and then install.
for automatic activation i have the following error: could not establish trust relationship for the SSL/TLS secure channel with telerik.
before i didn't have this error when i activate.
is there other solution?
It seems your firewall is forbidding the SSL connection. You can use the "Manual" activation process thou.
Just click on the "Manual" option on the second step and follow the License Wizard Guides.
Nikolai
the Telerik team
now when i try my test again, i have a compilation error !
is that is due to the fact that i created the test in previous version?
--------------------------------------------------
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\DNN TEST NB CLAIMS - UYW - with highlihting test - AND CONTROLS.aii.cs: Line 46: (CS0101) The namespace 'TestProject21' already contains a definition for 'DNN_TEST_NB_CLAIMS___UYW___with_highlihting_test___AND_CONTROLS'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Project.cs: Line 19: (CS0101) The namespace 'TestProject21' already contains a definition for 'Pages'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Project.cs: Line 66: (CS0102) The type 'TestProject21.Pages' already contains a definition for 'NASPage'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Project.cs: Line 85: (CS0102) The type 'TestProject21.Pages' already contains a definition for 'UserLogInPage'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Project.cs: Line 128: (CS0102) The type 'TestProject21.Pages' already contains a definition for 'NAS_0Page'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Project.cs: Line 147: (CS0102) The type 'TestProject21.Pages' already contains a definition for 'PortfolioPage'
: Line 0: (CS0101) The namespace 'TestProject21' already contains a definition for 'DNN_TEST_NB_CLAIMS___UYW___with_highlihting_test__1_'
: Line 0: (CS0101) The namespace 'TestProject21' already contains a definition for 'DNN_TEST_NB_CLAIMS___UYW___with_highlihting_test___AND_CONTROLS_1_'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Backup\2010.2.6.23\DNN TEST NB CLAIMS - UYW - with highlihting test - AND CONTROLS.aii.cs: Line 46: (CS0101) The namespace 'TestProject21' already contains a definition for 'DNN_TEST_NB_CLAIMS___UYW___with_highlihting_test___AND_CONTROLS'
: Line 0: (CS0101) The namespace 'TestProject21' already contains a definition for 'DNN_TEST_NB_OF_CLAIMS_BY_UWY'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Backup\2010.2.6.23\Project.cs: Line 19: (CS0101) The namespace 'TestProject21' already contains a definition for 'Pages'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Backup\2010.2.6.23\Project.cs: Line 66: (CS0102) The type 'TestProject21.Pages' already contains a definition for 'NASPage'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Backup\2010.2.6.23\Project.cs: Line 85: (CS0102) The type 'TestProject21.Pages' already contains a definition for 'UserLogInPage'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Backup\2010.2.6.23\Project.cs: Line 128: (CS0102) The type 'TestProject21.Pages' already contains a definition for 'NAS_0Page'
c:\Users\User\Documents\WebUI Test Studio Projects\TestProject21\Backup\2010.2.6.23\Project.cs: Line 147: (CS0102) The type 'TestProject21.Pages' already contains a definition for 'PortfolioPage'
Just delete the Project.cs file (find it in the test project folder by Windows Explorer) to get rid of the compilation error.
Since the official release we changed the way we generate the project elements and that change affects the coded tests in a project. We will probably ignore this outdated file for compilation for the next official release (Service Pack) but this improvement has not come with the internal build so far.
Greetings,
Konstantin Petkov
the Telerik team
in fact i have a case with data driven but i don't know exactly how can i do it. i do something but something still missing. can we do a gotomeeting to show you this?
I am online now with GoToMeeting waiting for you, if you're still around. I'll wait for 15 minutes. Otherwise we can meet tomorrow at 9am EST.
1. Please join my meeting.
https://www2.gotomeeting.com/join/804042619
2. Use your microphone and speakers (VoIP) - a headset is recommended. Or, call in using your telephone.
Dial 714-551-0021
Access Code: 804-042-619
Audio PIN: Shown after joining the meeting
Meeting ID: 804-042-619
GoToMeeting®
Online Meetings Made Easyâ„¢
Cody
the Telerik team
I've scheduled a GoToMeeting for 9am EST.
1. Please join my meeting.
https://www2.gotomeeting.com/join/402058011
2. Use your microphone and speakers (VoIP) - a headset is recommended. Or, call in using your telephone.
Dial 712-338-7101
Access Code: 402-058-011
Audio PIN: Shown after joining the meeting
Meeting ID: 402-058-011
GoToMeeting®
Online Meetings Made Easyâ„¢
Greetings,
Cody
the Telerik team
Looks like I'm going to be late arriving to the office today. Let's meet 30 minutes later, 9:30 which is 1.5 hours from now. Thx.
Kind regards,
Cody
the Telerik team
hi,
What was the solution for this issue?
I have the same probleM
: c:\PVT\ALLPVT\PVT\CRM\ContextualReports\Login.tstest.cs: Line 44: (CS0101) The namespace 'PVT' already contains a definition for 'Login'
I just copy some test cases for one project to a new project, and I have that compilation error.
How can I resolve that?
An easy solution I can find, was delete the test cases copied in the new project, and create new test cases with the name of the test caes I need, and just copy the steps. Looks like this works, but how can avoid to do that? just copy test cases from a proyecto to other without do the process that I explain?
Thanks
Unfortunately I don't remember what the resolution was for that problem. It was too long ago (over a year) and obviously I didn't note the solution in the thread.
The error message is trying to tell you that you have two (or more) .cs files that both have a definition for a Login. For example if you have two files that both start out like this it will generate that error:
using System;
using System.Collections.Generic;
using System.Text;
using ArtOfTest.Common.UnitTesting;
using ArtOfTest.WebAii.Core;
using ArtOfTest.WebAii.Controls.HtmlControls;
using ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts;
using ArtOfTest.WebAii.Design;
using ArtOfTest.WebAii.Design.Execution;
using ArtOfTest.WebAii.ObjectModel;
using ArtOfTest.WebAii.Silverlight;
using ArtOfTest.WebAii.Silverlight.UI;
using Telerik.WebAii.Controls.Html;
using Telerik.WebAii.Controls.Xaml;
namespace MySampleTests
{
public class RadCalendar : BaseWebAiiTest
{
[CodedStep(@"RadCalendar: Select date '6/16/2009'")]
public void RadCalendar_CodedStep()
{
If you copied Login.tstest.cs more than once to multiple places (such as into multiple different sub-folders) that will cause this error.
To overcome it you need to rename the duplicate tests so that each test as a unique name across the entire test project. Greetings,
Cody
the Telerik team
Yes, actually this is what I have, multiple Test Cases with the same name, but in sub folders. In this case is a test case just for login, but I need to log in with different users for different scenarios, so for that reason I split those in subfolders. I will try renaming those test cases.
thanks,
That will do the trick. We will be here if you run into further troubles.
Regards,Cody
the Telerik team