Nunit Template - "System.NullReferenceException:Object reference not set to an instance of an object" is displayed when calling method from one class to other
Error is displayed when Iam calling method from class 2 to class 1.
Please find below sample code
Error is displayed when Iam calling method from class 2 to class 1.
Please find below sample code
namespace UnitTestProject4
{
public class Class1: BaseTest
[Test]
{ public void Testmethod1()
{
Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
ActiveBrowser.NavigateTo("http://www.wikipedia.org/");
Class2. Testmethod2 ("Telerik Test Studio");
Find.ByName<HtmlInputSubmit>("go").Click();
}
public partial class Class2
{
static Settings setting = new Settings();
static Manager Manager = new Manager(setting);
public static void Testmethod2 (string A)
{
Manager.ActiveBrowser.Find.ById<HtmlInputSearch>("searchInput").Text = A;
}
}
}