I get the above error message on running this code:
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CV_Lib_Test
{
class Program
{
static void Main(string[] args)
{
//Instantiate Firefox Driver
var driver = new ChromeDriver();
//Old Code - FirefoxDriver.Navigate().GoToUrl("https://www.cv-library.co.uk/candidate/login");
driver.Navigate().GoToUrl("https://www.cv-library.co.uk/candidate/login");
//Wait for web element to become visible
System.Threading.Thread.Sleep(15000);
//Enter User Name - Email Address
var user = driver.FindElement(By.Id("cand-login-left"));
user.SendKeys("EMAIL");
//Enter Password - Account Pasword
var pass = driver.FindElement(By.Id("cand-login-left"));
pass.SendKeys("PASSWORD");
//Click on Login button
driver.FindElement(By.Id("cand-login-left")).Click();
}
}
}
My research revealed a few similar questions but they were not exactly helpful:
Does anyone know how I can implement the action class ( in the case of my code) using C#?
I strongly believe that that should fix the issue.