Attempting to execute JavaScript within Selenium WebDriver has resulted in an error. The script was stored in a string variable and passed to the `executeScript()` method. Upon running the script, a `JavascriptException` occurred. Below is the code snippet that was executed:
String js="<html>\r\n" +
// Code continues...
The error message received upon execution of the script:
Exception in thread "main" org.openqa.selenium.JavascriptException: javascript error: Unexpected token '<'
(Session info: chrome=79.0.3945.130)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
// Error log continues...
If anyone can provide assistance in resolving this issue, it would be greatly appreciated.