I am getting "OpenQA.Selenium.WebDriverException: 'javascript error: Invalid left-hand side in assignment." error. | Selenium C# Forum
A
Arpita Goyal Posted on 28/06/2020

Please resolve below error.

 

OpenQA.Selenium.WebDriverException: 'javascript error: Invalid left-hand side in assignment.

 

public static void Main(string[] args)
{
IWebDriver driver = new ChromeDriver();
driver.Manage().Window.Maximize();

IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
js.ExecuteScript("window-location='https://www.gmail.com'");


}


S
Support Team Replied on 03/07/2020

On which line are you getting this error