I'm getting following error at verification stage:
"An unhandled exception of type 'System.NullReferenceException' occurred in nunit.framework.dll
Additional information: Object reference not set to an instance of an object."
code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;
using System.Globalization;
using System.Threading.Tasks;
namespace Login_Val_Test_Do_Not_Use
{
class Program
{
static void Main(string[] args)
{
//Instantiate Firefox Driver
//Go to CV Library Website
var driver = new FirefoxDriver();
driver.Navigate().GoToUrl("https://www.cv-library.co.uk/");
//Wait for web element to become visible
System.Threading.Thread.Sleep(15000);
//Click on Login button
driver.FindElement(By.XPath(".//*[@id='home-nav-right']/a[1]")).Click();
//Verification that specified page opens
var loggedInHeader = driver.FindElement(By.Id("cand-login-tabs"));
Assert.IsTrue(loggedInHeader.Displayed, "Unable to access page");
}
}
}