Start a new topic

Splash error using document.querySelectorAll

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}

 

Login to post a comment