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

Problem with "Pages"

7 Answers 108 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Igor
Top achievements
Rank 1
Igor asked on 15 Dec 2010, 03:51 PM
Hello. I've recorder test from WebUI test studio. It records me like that:

using Telerik.WebAii.Controls.Html;
//using Telerik.WebAii.Controls.Xaml;
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
 
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;
 
namespace SFTQuickStarts_NUnit_CS
{
 
 
    public class Login : BaseWebAiiTest
    {
        #region [ Dynamic Pages Reference ]
 
        private string loginPage; // path to site
        private string emulatorPath; // path to emulator
        private string credentials; // path to file with credentials
        private string sitePage; // path to file with site page
        private string login;
        private string pass;
        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

It is working from WebUI studio. Then I moved this code to Visual Studio 2010. The automation library was connected. But

private Pages _pages;
 
public Pages Pages
        {
            get
            {
                if (_pages == null)
                {
                    _pages = new Pages(Manager.Current);
                }
                return _pages;
            }
        }

are marked as incorrect. After trying to build project I receive the next:

Error   1   The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?) C:\Program Files\Telerik\WebUI Test Studio 2010.3\Samples\WebAii Framework\QuickStarts_NUnit_CS\Login.cs    32  17  QuickStarts_NUnit_CS
 
Error   2   The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?) C:\Program Files\Telerik\WebUI Test Studio 2010.3\Samples\WebAii Framework\QuickStarts_NUnit_CS\Login.cs    39  16  QuickStarts_NUnit_CS

Please help me.

7 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 15 Dec 2010, 06:26 PM
Hi Igor,

We will answer this in the previous forum post you already made.

Best wishes,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Igor
Top achievements
Rank 1
answered on 16 Dec 2010, 09:50 AM
Sorry, but I don't see the answer/
0
Stoich
Telerik team
answered on 16 Dec 2010, 01:03 PM
Hi Igor,
   it's very strange that this URL is inaccessible to you. Maybe the href was generated incorrectly. Please try pasting this directly to the Navigation bar and see whether you're able to see the answer then:
http://www.telerik.com/automated-testing-tools/community/forums/webui-test-studio-developer-edition/webaii-automation-framework/the-type-or-namespace-name-pages-could-not-be-found.aspx

I've also attached the answer (the HMTL page containing it) to this message just in case.

Hope to hear from you soon!

Regards,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Igor
Top achievements
Rank 1
answered on 16 Dec 2010, 02:50 PM
I can open URL. I see only my question. Where is the your answer? The same in your archive.

0
Cody
Telerik team
answered on 16 Dec 2010, 05:32 PM
Hello Igor,

I am very sorry for the confusion. Due to our workload we have been unable to actively work on your problem. However we will be getting to it very soon... I expect a little later today. Please keep watching for our response.

Greetings,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
James Faw
Top achievements
Rank 1
answered on 10 Mar 2011, 05:18 PM
hi,

The same problem happens for me.

Was it solved????

1. I installed the newest version developer edition.
2. I have cretaed new project
3. I recorded some script.
4. While I didn't do any changes behind the scene, everything worked perfectly.
5. I decided to go and change Wait.ForExist(10000) to (100000)
6. I have the problem now with the Pages. It is not compilable and my script is not working anymore

In log I see:
------------------------------------------------------------
'10/03/2011 11:16:23 AM' - Starting execution....
'10/03/2011 11:16:30 AM' - Detected custom code in test. Locating test assembly: HMTest.dll.
'10/03/2011 11:16:30 AM' - Failure detected during execution. Details:
------------------------------------------------------------
'10/03/2011 11:16:30 AM' - System.IO.FileNotFoundException: Unable to find the code behind assembly. Please make sure you have compiled your code behind without errors before attempting to execute the test. Looking for: C:\Projects\Altus Projects\SampleTestProjects\HMTest\HMTest\bin\Debug\HMTest.dll
If you are running VS 2010, make sure Deployment is checked in your .settings file (in the solution items)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureAssemblyExists(String assembly)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureAssemblyExists(Test testcase)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, ExecutionType exeType, Guid lastStepGuid, DebuggerOptions debuggerOptions)
------------------------------------------------------------
'10/03/2011 11:16:31 AM' - Test completed!
0
James Faw
Top achievements
Rank 1
answered on 10 Mar 2011, 05:32 PM
Tags
General Discussions
Asked by
Igor
Top achievements
Rank 1
Answers by
Cody
Telerik team
Igor
Top achievements
Rank 1
Stoich
Telerik team
James Faw
Top achievements
Rank 1
Share this question
or