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

Telerik testing framework Storing Locators to achieve POM

1 Answer 16 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
uday
Top achievements
Rank 1
uday asked on 20 Aug 2015, 06:07 AM
Hi Team,

I'm working on creating a Telerik Testing Framework for HTML/Silverlight applications using Nunit following are the issues I encountered

1. To achieve Page Object Model I had seperated TestSuites,Pagemethods,SafeActions and except Locators I'm not able to store the locators outside the testsuite file I'm getting the errors while doing this
    as 
    ERROR:  An object reference is required for the non-static field, method, or property 'ArtOfTest.WebAii.Core.Find.ById(string)' D:\Telerik\TTF_FRAMEWORK\TelerikFramework2\Pages\PageConstants\GmailConstants.cs 148 31 TelerikFramework2
     
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ArtOfTest.WebAii.Controls.HtmlControls;
using ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts;
using ArtOfTest.WebAii.Core;
using ArtOfTest.WebAii.ObjectModel;
using ArtOfTest.WebAii.TestAttributes;
using ArtOfTest.WebAii.TestTemplates;
using ArtOfTest.WebAii.Win32.Dialogs;

using ArtOfTest.WebAii.Silverlight;
using ArtOfTest.WebAii.Silverlight.UI;

using NUnit.Framework;
using Core = NUnit.Core;
using TelerikFramework2;

namespace TelerikFramework2.Pages.PageConstants
{
   public  class Gmail : BaseTest
    {

     
     public static Element ID = Find.ById("Email");
     
     }
}


I understand "Find" class doesnot have any object reference since I'm not storing it in TestSuite ,I'm storing it in a class .cs file. Please provide me some suggestions so that I need to store all the locators seperatley and able access them from another class.Please Respond me ASAP ,Thanks in advance



Regard,
Uday. 

  

1 Answer, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 24 Aug 2015, 02:28 PM
Hello Uday,

I am closing this case as duplicate of the following thread:

http://www.telerik.com/forums/is-telerik-testing-framework-supports-silverlight-application-with-page-object-model

Let's keep the communication in one place only.

Thank you for your understanding.

Regards,
Ivaylo
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
uday
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Share this question
or