This question is locked. New answers and comments are not allowed.
Martin Blair
Top achievements
Rank 1
Martin Blair
asked on 10 Nov 2009, 10:39 PM
I am trying the WebUI Test Studio trial and I am having trouble recording the filter drop down choice "contains". Is it possible that this is considered a popup?
RadGridFilterItem: filter menu popup action for column 'full_name'.
RadMenuItem: item 'Contains' action -> Open
ArtOfTest.WebAii.Design.Exceptions.ExecutionException: Unhandled exception thrown during automation step execution ---> System.InvalidOperationException: Cannot navigate -- NavigateURL is not set!
at Telerik.WebAii.Controls.Html.RadMenuItem.Navigate()
at Telerik.WebAii.Design.Translators.Html.Menu.MenuItemActionDescriptor.Execute(Browser browser)
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
--- End of inner exception stack trace ---
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
Fantastic product so far other than that.
Any ideas?
RadGridFilterItem: filter menu popup action for column 'full_name'.
RadMenuItem: item 'Contains' action -> Open
ArtOfTest.WebAii.Design.Exceptions.ExecutionException: Unhandled exception thrown during automation step execution ---> System.InvalidOperationException: Cannot navigate -- NavigateURL is not set!
at Telerik.WebAii.Controls.Html.RadMenuItem.Navigate()
at Telerik.WebAii.Design.Translators.Html.Menu.MenuItemActionDescriptor.Execute(Browser browser)
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
--- End of inner exception stack trace ---
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
Fantastic product so far other than that.
Any ideas?
9 Answers, 1 is accepted
0
Hello Martin,
Thank you for the good words about the WebUI Test Studio. I'm glad you enjoy it!
This looks like an incorrect recorded test for some reason. Looking at the related source code I see a fix included in September that should have corrected such a problem, but you should already have that in with the version you have downloaded.
Indeed, the ContextMenu appears as a popup that is not part of the HtmlForm of the output. While trying to reproduce the problem you report, I noticed some other issues in regards to the RadGrid filtering (context menu) support and I'm adding those as a high priority to resolve for the official version of WebUI Test Studio v2.0.
In the meantime you should be able to work-around the reported error. Just convert the MenuItem 'Navigate' step to code and call the Click() method instead. You can also try finding the HtmlSpan element and simulate click on it like this:
I'm sorry for the temporary inconvenience and please let us know if this works for you or if you need further assistance.
All the best,
Konstantin Petkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thank you for the good words about the WebUI Test Studio. I'm glad you enjoy it!
This looks like an incorrect recorded test for some reason. Looking at the related source code I see a fix included in September that should have corrected such a problem, but you should already have that in with the version you have downloaded.
Indeed, the ContextMenu appears as a popup that is not part of the HtmlForm of the output. While trying to reproduce the problem you report, I noticed some other issues in regards to the RadGrid filtering (context menu) support and I'm adding those as a high priority to resolve for the official version of WebUI Test Studio v2.0.
In the meantime you should be able to work-around the reported error. Just convert the MenuItem 'Navigate' step to code and call the Click() method instead. You can also try finding the HtmlSpan element and simulate click on it like this:
[CodedStep(@"RadMenuItem: item 'Contains' action -> 'Click'")]public void FilteringByContains_CodedStep(){// RadMenuItem: item 'Contains' action -> 'Click'HtmlSpan containsSpan = this.Find.ByContent<HtmlSpan>("Contains");containsSpan.Click();}I'm sorry for the temporary inconvenience and please let us know if this works for you or if you need further assistance.
All the best,
Konstantin Petkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Martin Blair
Top achievements
Rank 1
answered on 12 Nov 2009, 12:03 AM
Thank you for your responce,
I converted it to code in order to work around the problem but the project will not build.
The circumstances are similar to this post:
http://www.telerik.com/community/forums/automated-testing/general-discussions/test-generation-fails-on-missing-assembly.aspx
Error 1 The type or namespace name 'UnitTesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?) C:\Documents ...\TechSiteFiltering.aii.cs 5 40 QA.Test.Framework
Error 2 The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?) C:\Documents ... \TechSiteFiltering.aii.cs 48 17 QA.Test.Framework
Error 3 The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?) C:\Documents ...\TechSiteFiltering.aii.cs 55 10 QA.Test.Framework
I can't find any dll 'Microsoft.VisualStudio.TestTools'.
I am currently using VSTS 2008 Test Edition.
and have the following references:
ArtOfTest.InternetExplorer
ArtOfTest.WebAii
ArtOfTest.WebAii.AspNet
ArtOfTest.WebAii.Design
Microsoft.VisualStudio.QualityTools.WebTestFramework
Telerik.WebAii.Controls.Html
Telerik.WebAii.Design.Translators.Html
I didn't change any code apart the what was in the previous post?
Any ideas?
I converted it to code in order to work around the problem but the project will not build.
The circumstances are similar to this post:
http://www.telerik.com/community/forums/automated-testing/general-discussions/test-generation-fails-on-missing-assembly.aspx
Error 1 The type or namespace name 'UnitTesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?) C:\Documents ...\TechSiteFiltering.aii.cs 5 40 QA.Test.Framework
Error 2 The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?) C:\Documents ... \TechSiteFiltering.aii.cs 48 17 QA.Test.Framework
Error 3 The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?) C:\Documents ...\TechSiteFiltering.aii.cs 55 10 QA.Test.Framework
I can't find any dll 'Microsoft.VisualStudio.TestTools'.
I am currently using VSTS 2008 Test Edition.
and have the following references:
ArtOfTest.InternetExplorer
ArtOfTest.WebAii
ArtOfTest.WebAii.AspNet
ArtOfTest.WebAii.Design
Microsoft.VisualStudio.QualityTools.WebTestFramework
Telerik.WebAii.Controls.Html
Telerik.WebAii.Design.Translators.Html
I didn't change any code apart the what was in the previous post?
Any ideas?
0
Hello Martin,
That assembly should be available in the VS Public Assemblies folder upon VS Test Edition installation. The standard folder the VS Project references the assemblies looks like this:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies
I've attached a snap shot to show you what you should get upon initiating to add new reference for the .Net assemblies. If you cannot find the assembly this way, have you tried locating it in the GAC?
Otherwise you may try a repair of VS installation to resolve the problem.
Regards,
Konstantin Petkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
That assembly should be available in the VS Public Assemblies folder upon VS Test Edition installation. The standard folder the VS Project references the assemblies looks like this:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies
I've attached a snap shot to show you what you should get upon initiating to add new reference for the .Net assemblies. If you cannot find the assembly this way, have you tried locating it in the GAC?
Otherwise you may try a repair of VS installation to resolve the problem.
Regards,
Konstantin Petkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Martin Blair
Top achievements
Rank 1
answered on 12 Nov 2009, 04:36 PM
I found the UnitTesting dll. It was in a odd place on my machine for some reason. However I am still missing the 'pages' reference for my project.
What do I need to add to my project to get 'Pages' referrenced?
Error 1 The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\martin.blair\My Documents\Visual Studio 2008\Projects\G2\Main\source\QA.Test.Framework\TechSiteFiltering.aii.cs 53 17 QA.Test.Framework
Error 2 The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\martin.blair\My Documents\Visual Studio 2008\Projects\G2\Main\source\QA.Test.Framework\TechSiteFiltering.aii.cs 60 17 QA.Test.Framework
What do I need to add to my project to get 'Pages' referrenced?
Error 1 The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\martin.blair\My Documents\Visual Studio 2008\Projects\G2\Main\source\QA.Test.Framework\TechSiteFiltering.aii.cs 53 17 QA.Test.Framework
Error 2 The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\martin.blair\My Documents\Visual Studio 2008\Projects\G2\Main\source\QA.Test.Framework\TechSiteFiltering.aii.cs 60 17 QA.Test.Framework
| private Pages _pages; |
| and... |
| public Pages Pages |
| { |
| get |
| { |
| if (_pages == null) |
| { |
| _pages = |
| new Pages(Manager.Current); |
| } |
| return _pages; |
| } |
| } |
0
Hello Martin ,
Here is a blank code behind file for WebUI version 2009.2 924, just the namespace being unique to my project:
The DLL references to the project should be: ArtOfTest.WebAii (v1.1.900.0), ArtOfTest.WebAii.Design (v1.1.1.0), Telerik.WebAii.Controls.Html(v2009.2.826.11). If the haven't been automatically added to your project, you should be able to find them in the WebUI installation folder.
Regards,
Nelson Sin
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Here is a blank code behind file for WebUI version 2009.2 924, just the namespace being unique to my project:
using System; using System.Text; using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; using ArtOfTest.WebAii.Core; using ArtOfTest.WebAii.Design.Execution; using ArtOfTest.WebAii.Design; using ArtOfTest.WebAii.Controls.HtmlControls; using ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts; using Telerik.WebAii.Controls.Html; namespace TestProject21 { // // You can add custom execution steps by simply // adding a void function and decorating it with the [CodedStep] // attribute to the test method. // Those steps will automatically show up in the test steps on save. // // The BaseWebAiiTest exposes all key objects that you can use // to access the current testcase context. [i.e. ActiveBrowser, Find ..etc] // // Data driven tests can use the Data[columnIndex] or Data["columnName"] // to access data for a specific data iteration. // // Example: // // [CodedStep("MyCustom Step Description")] // public void MyCustomStep() // { // // Custom code goes here // ActiveBrowser.NavigateTo("http://www.google.com"); // // // Or // ActiveBrowser.NavigateTo(Data["url"]); // } // public class WebAiiTest1 : BaseWebAiiTest { #region [ Dynamic Pages Reference ] private Pages _pages; /// <summary> /// Gets the Pages object that has references /// to all the elements, frames or regions /// in this project. /// </summary> public Pages Pages { get { if (_pages == null) { _pages = new Pages(Manager.Current); } return _pages; } } #endregion // Add your test methods here... } }The DLL references to the project should be: ArtOfTest.WebAii (v1.1.900.0), ArtOfTest.WebAii.Design (v1.1.1.0), Telerik.WebAii.Controls.Html(v2009.2.826.11). If the haven't been automatically added to your project, you should be able to find them in the WebUI installation folder.
Regards,
Nelson Sin
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Martin Blair
Top achievements
Rank 1
answered on 23 Nov 2009, 07:39 PM
I'm still having trouble with this issue. I verified the version numbers as you suggested and they were the right ones.
Recently I uninstalled the base trial and installed the beta but I still get the problem. See the pages_issue.jpg to see what I get.
Following the a recent example of a step converted to code. (ignore the bareURL variable. It is another issue)
Recently I uninstalled the base trial and installed the beta but I still get the problem. See the pages_issue.jpg to see what I get.
Following the a recent example of a step converted to code. (ignore the bareURL variable. It is another issue)
| using System; |
| using System.Text; |
| using System.Collections.Generic; |
| using Microsoft.VisualStudio.TestTools.UnitTesting; |
| using ArtOfTest.WebAii.Core; |
| using ArtOfTest.WebAii.Design.Execution; |
| using ArtOfTest.WebAii.Design; |
| using ArtOfTest.WebAii.Controls.HtmlControls; |
| using ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts; |
| using ArtOfTest.WebAii.Silverlight; |
| using ArtOfTest.WebAii.Silverlight.UI; |
| using Telerik.WebAii.Controls.Html; |
| using Telerik.WebAii.Controls.Xaml; |
| namespace QA.Test.Framework |
| { |
| // |
| // You can add custom execution steps by simply |
| // adding a void function and decorating it with the [CodedStep] |
| // attribute to the test method. |
| // Those steps will automatically show up in the test steps on save. |
| // |
| // The BaseWebAiiTest exposes all key objects that you can use |
| // to access the current testcase context. [i.e. ActiveBrowser, Find ..etc] |
| // |
| // Data driven tests can use the Data[columnIndex] or Data["columnName"] |
| // to access data for a specific data iteration. |
| // |
| // Example: |
| // |
| // [CodedStep("MyCustom Step Description")] |
| // public void MyCustomStep() |
| // { |
| // // Custom code goes here |
| // ActiveBrowser.NavigateTo("http://www.google.com"); |
| // |
| // // Or |
| // ActiveBrowser.NavigateTo(Data["url"]); |
| // } |
| // |
| public class BaseURLTest : BaseWebAiiTest |
| { |
| #region [ Dynamic Pages Reference ] |
| private Pages _pages; |
| /// <summary> |
| /// Gets the Pages object that has references |
| /// to all the elements, frames or regions |
| /// in this project. |
| /// </summary> |
| public Pages Pages |
| { |
| get |
| { |
| if (_pages == null) |
| { |
| _pages = new Pages(Manager.Current); |
| } |
| return _pages; |
| } |
| } |
| #endregion |
| //[CodedStep(@"Navigate to : 'http://intauststweb1.msdf.org/'")] |
| //public void BaseURLTest_CodedStep() |
| //{ |
| // // Navigate to : 'http://intauststweb1.msdf.org/' |
| // ActiveBrowser.NavigateTo("http://intauststweb1.msdf.org/"); |
| //} |
| [CodedStep(@"Navigate to : Relative build URL")] |
| public void BaseURLTest_CodedStep() |
| { |
| ActiveBrowser.NavigateTo(BaseURL); // URL format like "~/BuildURL/Page.html" |
| } |
| // Add your test methods here... |
| } |
| } |
0
Hi again Martin,
Thanks for the screenshots. Is there a Project.Elements and a Project.cs file in your test project? If not, could you try adding a new WebAii Test with a code behind file (.aii.cs file), then clean/build the solution to see if those files are generated? Also, would it be possible for you to attach the test project for us to check out on this end?
Kind regards,
Nelson
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thanks for the screenshots. Is there a Project.Elements and a Project.cs file in your test project? If not, could you try adding a new WebAii Test with a code behind file (.aii.cs file), then clean/build the solution to see if those files are generated? Also, would it be possible for you to attach the test project for us to check out on this end?
Kind regards,
Nelson
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Martin Blair
Top achievements
Rank 1
answered on 23 Nov 2009, 08:20 PM
Hmmm,
There was a Project.Elements but it's not there now. I don't know if it disappeared after I uninstalled or perhaps I removed after the uninstall in an effort to clear up this problem.
Regardless, It doesn't seem to be there anymore and I have added several new .aii tests recently so it doesn't look like its going to be added automatically.
Can you give me instructions on how to replace it?
There was a Project.Elements but it's not there now. I don't know if it disappeared after I uninstalled or perhaps I removed after the uninstall in an effort to clear up this problem.
Regardless, It doesn't seem to be there anymore and I have added several new .aii tests recently so it doesn't look like its going to be added automatically.
Can you give me instructions on how to replace it?
0
Hello again Martin,
If the files are not in the project folder, you can add an XML file to the project and give it the name 'Project.Elements'. When it opens, you can just delete the default text, ignore the error and save/close.
A 'Project.cs' file should automatically be generated, but just to force new code generation, please right click on the 'Project.Elements' and select 'Run Custom Tools'.
A Clean/Build of the solution should get rid of the pages compile error.
All the best,
Nelson
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
If the files are not in the project folder, you can add an XML file to the project and give it the name 'Project.Elements'. When it opens, you can just delete the default text, ignore the error and save/close.
A 'Project.cs' file should automatically be generated, but just to force new code generation, please right click on the 'Project.Elements' and select 'Run Custom Tools'.
A Clean/Build of the solution should get rid of the pages compile error.
All the best,
Nelson
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.