就是这段代码,在selenium生成的界面是可以运行的,但是在pycharm中运行就是报错
报错显示就是这段js代码出问题
js = '''
url = %s
function TB(url) {
var httpRequest = new XMLHttpRequest()
httpRequest.open('GET', url, false)
httpRequest.send()
var data = httpRequest.responseText
return data
}
TB(url)
'''%url
报错信息
selenium.common.exceptions.JavascriptException: Message: javascript error: Unexpected token ':'