Splash error using document.querySelectorAll

Posted over 6 years ago by Alessio Pollero

Post a topic
Un Answered
A
Alessio Pollero

I have to run this javascript with splash : document.querySelectorAll("div[data-tab=\"rates\"]")[0].click() that run correctly inside chrome browser, but when trying to run it with splash like this: 

assert(splash:runjs('document.querySelectorAll("div[data-tab=\"rates\"]")[0].click()'))



it is giving this error : 



 

Bad request to Splash: {u'info': {u'source': u'[string "..."]', u'message': u'Lua error: [string "..."]:9: JS error: "SyntaxError: Unexpected identifier \'rates\'. Expected \')\' to end a argument list."', u'type': u'LUA_ERROR', u'line_number': 9, u'error': u'JS error: "SyntaxError: Unexpected identifier \'rates\'. Expected \')\' to end a argument list."'}, u'type': u'ScriptError', u'description': u'Error happened while executing Lua script', u'error': 400}

 

0 Votes


0 Comments

Login to post a comment