Pages does not contain a definition for PageTitle

6 posts, 0 answers
  1. John
    John avatar
    8 posts
    Member since:
    Jul 2012

    Posted 21 Jul 2012 Link to this post

    I see the following error: 

    c:\JCRDocs\AutomationLocal\PortalC_Sharp\Activation Test by tag\Find Active Edition Csharp.tstest.cs: Line 103: (CS1061) 'PortalC_Sharp.Pages' does not contain a definition for 'PageTitle' and no extension method 'PageTitle' accepting a first argument of type 'PortalC_Sharp.Pages' could be found (are you missing a using directive or an assembly reference?)

    Here is the code entered, I do not follow what is wrong. 

    HtmlDiv gridDiv = Find.ById<HtmlDiv>("ctl00_cphApp_rdProducts_C_grdMyProducts");  // HTML ID = id="ctl00_cphApp_rdProducts_C_grdMyProducts"
    HtmlDiv content = gridDiv.Find.ByAttributes<HtmlDiv>("rdCenter"); // class=rdCenter
      
    HtmlTable table = content.Find.ByTagIndex<HtmlTable>("table", 0);
    Log.WriteLine("Rows Count: " + table.Rows.Count.ToString());
      
    foreach (HtmlTableRow row in table.AllRows)
    {
        foreach (HtmlTableCell cell in row.Cells)
        {
            Log.WriteLine(cell.InnerText);
     
        }
    }
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 25 Jul 2012 Link to this post

    Hi John,

    It seems that the "PageTitle" element is missing in the Elements Explorer, but there is an existing reference to that element in one of the code behind files used in your project - "Find Active Edition Csharp.tstest.cs". Please see this article on how to resolve missing page elements error.

    If you continue to have difficulty, please place your project folder in a zip file and attach it here. If you deem that information too sensitive for a public forum, please attach it to a new support ticket (which is confidential) and reference this thread.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Deepeka
    Deepeka avatar
    1 posts
    Member since:
    Aug 2012

    Posted 04 Dec 2013 Link to this post

    Hi Team,

    I am facing same issue when upgraded to latest 2013 R2 version (for now i am using the trial version and found this issue  , will be upgrading to licensed version after 10th dec.2013)

    c:\Platform\Priority 1 Regression Tests\Content Management\Files\Verify_Create File Group_Files_Content ManagementTest.tstest.cs: Line 80: (CS1061) 'Regression_Project.Pages.EDGE6iContentManagement20Page' does not contain a definition for 'FileGroupNameText' and no extension method 'FileGroupNameText' accepting a first argument of type 'Edge_Regression_Project.Pages.EDGE6iContentManagement20Page' could be found (are you missing a using directive or an assembly reference?)

    For most of my coded test cases this issue occuring when upgarded to latest version.
    Please suggest with the solution steps or do i have to go in each test case and add the missing element ??


    Thanks,
    D
  4. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 09 Dec 2013 Link to this post

    Hello,

    In order to solve this problem, I am afraid that you should proceed as advised below and following the steps in this article.
    If you continue to have difficulty, please place your project folder in a zip file and attach it so we can review it further, please note that this thread is public available and it will be better to open a support ticket for providing your project, where all the information remains private.

    Thank you for your understanding.

    Regards,
    Ivaylo
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Deepeka
    Deepeka avatar
    1 posts
    Member since:
    Aug 2012

    Posted 23 Jan 2014 Link to this post

    Thanks Ivaylo.

    Had tried with the provided solution but still facing the same issue. Whenever i open the tests its builds the elements and creates a new one instaed of existing
     c:\edgePlatform\Priority 2 Regression Tests\System Admin\Catalog\Add_Warranty Types Coverage_ItemTypes_System AdminTest.tstest.cs: Line 88: (CS1061) 'Edge_Regression_Project.Pages.EDGE6iAdmin210Page' does not contain a definition for 'WarrantyCoverageNameText' and no extension method 'WarrantyCoverageNameText' accepting a first argument of type 'Edge_Regression_Project.Pages.EDGE6iAdmin210Page' could be found (are you missing a using directive or an assembly reference?)

    so it shows error for line -
     Actions.SetText(Pages.EDGE6iAdmin210.WarrantyCoverageNameText, ((string)(System.Convert.ChangeType(Data["Name"]+date, typeof(string)))));

    and in actual it builds element with EDGE6iAdmin2100 " , and then have to substitute manually from Pages.EDGE6iAdmin210.WarrantyCoverageNameText to Pages.EDGE6iAdmin2100.WarrantyCoverageNameText.

    Many of my test cases are failing due to this reason. Please let me know how this issue can be avoided and as each time the tests gets load and it shows different compilation error , seems building elements change each time.




  6. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 28 Jan 2014 Link to this post

    Hello,

    Please note that I will need your project as stated in my previous reply in order to investigate further.

    Looking forward to hearing from you.

    Regards,
    Ivaylo
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top