This is a migrated thread and some comments may be shown as answers.

Pages not defined

5 Answers 135 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
john
Top achievements
Rank 1
john asked on 11 Aug 2011, 01:45 PM

After converting steps to code, I see an error and that error is that type Pages is not defined.  Do we need to define it and where do we define and to what?

 

Thanks,

John

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 11 Aug 2011, 02:42 PM
Hi John,

Which version of Test Studio are using? Try to upgrade to our latest release in which this problem should be solved. You can download it from your Telerik account (see screenshot).

Hope this helps!

Greetings,
Plamen
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Satyajeet
Top achievements
Rank 1
answered on 03 Jan 2012, 12:03 PM
Hi Plamen,
 
I have downloaded the latest release as suggested from Telerik account.
But i still see the error Type 'Pages' is not defined.

Regards,
Satya
0
Plamen
Telerik team
answered on 04 Jan 2012, 01:30 PM
Hello,

The most common reason for the error "Pages is not defined" is a namespace mismatch. Please make sure that the namespace for any .cs files are the same as the project name. For example, if my VS project is named "TestStudioProject51" then Test Studio generates a Pages.g.cs file having that namespace:
//------------------------------------------------------------------------------
// <auto-generated>
//   This code was generated by a tool.
//   Runtime Version:4.0.30319.239
//
//   Changes to this file may cause incorrect behavior and will be lost if
//   the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
  
namespace TestStudioProject51
{
    using ArtOfTest.WebAii.Core;
    using ArtOfTest.WebAii.ObjectModel;
    using ArtOfTest.WebAii.TestAttributes;
    using ArtOfTest.WebAii.TestTemplates;
    using ArtOfTest.WebAii.Controls.HtmlControls;
      
    public class Pages
    {



If your code behind files are not using the same namespace you will get the "Pages is not defined" error. This is how a code behind file should resemble for the project "TestStudioProject51"

using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
  
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 TestStudioProject51
{

If this is not the case, please put your entire test project into a .zip file and attach it to a support ticket, which is confidential unlike this forum thread. We'll try to find what cause this error and fix it for you (We don't need to run the tests, we'll just fix the compile error).

All the best,
Plamen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
John
Top achievements
Rank 2
answered on 05 Jan 2012, 06:05 PM
Can you please show us the VB version?  Also, I was told to exit out after converting the steps to code and then come back in to rebuild.  This is a known issue.

Thanks,
John
0
Plamen
Telerik team
answered on 06 Jan 2012, 09:37 AM
Hi John,

That is correct, this is a known issue. You can track the progress and vote for this PITS Item here: Public URL .  

The workaround is to close all project files and reload the VB project. Open the problematic test again and build the project. Here's a video demonstrating that: http://screencast.com/t/FjUPrZIdYGAi .

All the best,
Plamen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
john
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Satyajeet
Top achievements
Rank 1
John
Top achievements
Rank 2
Share this question
or