Problem with "Pages"

8 posts, 0 answers
  1. Igor
    Igor avatar
    11 posts
    Member since:
    Dec 2010

    Posted 15 Dec 2010 Link to this post

    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.
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 15 Dec 2010 Link to this post

    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
  3. Igor
    Igor avatar
    11 posts
    Member since:
    Dec 2010

    Posted 16 Dec 2010 Link to this post

    Sorry, but I don't see the answer/
  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 16 Dec 2010 Link to this post

    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
  5. Igor
    Igor avatar
    11 posts
    Member since:
    Dec 2010

    Posted 16 Dec 2010 Link to this post

    I can open URL. I see only my question. Where is the your answer? The same in your archive.

  6. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 16 Dec 2010 Link to this post

    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
  7. James Faw
    James Faw avatar
    17 posts
    Member since:
    May 2009

    Posted 10 Mar 2011 Link to this post

    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!
  8. James Faw
    James Faw avatar
    17 posts
    Member since:
    May 2009

    Posted 10 Mar 2011 Link to this post

Back to Top