如果我仅插入文本和数字,则它将接受此内容,但是如果我使用',则使用单个倒数逗号,然后出现错误。 这是代码
JavascriptExecutor js = (JavascriptExecutor) Registration;
String preValue = "SELECT * FROM 'users' where email='Email@Email.com'";
js.executeScript("document.getElementsByTagName('pre')[1].innerText='" + preValue + "';");
org.openqa.selenium.JavascriptException: SyntaxError: unexpected token: identifier
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'AZAD-PC', ip: '192.168.1.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_191'