Hi I am new to C# and selenium I am getting error as object reference not set to an instance of an object.My code is
public LoginPage()
: base()
{
PageFactory.InitElements(Driver, this);
}
public LoginPage GoTo()
{
Console.WriteLine(ApplicationbaseURL());
Driver.Navigate().GoToUrl(ApplicationbaseURL());
try
{
if (this.IsCurrentPage() == false)
{
throw new WebDriverException("Not on correct Page");
}
}
catch (WebDriverException ex)
{
Console.WriteLine("Exception caught: {0}", ex);
}
return this;
}