{"action":"created","issue":{"url":"https://api.github.com/repos/scrapinghub/splash/issues/200","labels_url":"https://api.github.com/repos/scrapinghub/splash/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/scrapinghub/splash/issues/200/comments","events_url":"https://api.github.com/repos/scrapinghub/splash/issues/200/events","html_url":"https://github.com/scrapinghub/splash/issues/200","id":64786897,"number":200,"title":"Lua Scripting - Submiting via JS","user":{"login":"AlexIzydorczyk","id":5503240,"avatar_url":"https://avatars.githubusercontent.com/u/5503240?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexIzydorczyk","html_url":"https://github.com/AlexIzydorczyk","followers_url":"https://api.github.com/users/AlexIzydorczyk/followers","following_url":"https://api.github.com/users/AlexIzydorczyk/following{/other_user}","gists_url":"https://api.github.com/users/AlexIzydorczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexIzydorczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexIzydorczyk/subscriptions","organizations_url":"https://api.github.com/users/AlexIzydorczyk/orgs","repos_url":"https://api.github.com/users/AlexIzydorczyk/repos","events_url":"https://api.github.com/users/AlexIzydorczyk/events{/privacy}","received_events_url":"https://api.github.com/users/AlexIzydorczyk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-27T15:38:50Z","updated_at":"2015-10-13T16:09:53Z","closed_at":null,"body":"Hi,\r\n\r\nI've been having trouble getting a lua script that calls something like:\r\n\r\n    splash:runjs(\"$(':submit')[0].click()\")\r\n\r\nto run. That is, splash doesn't seem to actually render the result of the page after submission - as if the submit button had been clicked in the first place.\r\n\r\nAny idea how to work around this or what I may be doing wrong?\r\n\r\nThanks,\r\nAlex\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/scrapinghub/splash/issues/comments/147762563","html_url":"https://github.com/scrapinghub/splash/issues/200#issuecomment-147762563","issue_url":"https://api.github.com/repos/scrapinghub/splash/issues/200","id":147762563,"user":{"login":"Youwotma","id":224189,"avatar_url":"https://avatars.githubusercontent.com/u/224189?v=3","gravatar_id":"","url":"https://api.github.com/users/Youwotma","html_url":"https://github.com/Youwotma","followers_url":"https://api.github.com/users/Youwotma/followers","following_url":"https://api.github.com/users/Youwotma/following{/other_user}","gists_url":"https://api.github.com/users/Youwotma/gists{/gist_id}","starred_url":"https://api.github.com/users/Youwotma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Youwotma/subscriptions","organizations_url":"https://api.github.com/users/Youwotma/orgs","repos_url":"https://api.github.com/users/Youwotma/repos","events_url":"https://api.github.com/users/Youwotma/events{/privacy}","received_events_url":"https://api.github.com/users/Youwotma/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T16:09:53Z","updated_at":"2015-10-13T16:09:53Z","body":"You can test the existence of the element and click it while it exists like this:\r\n```\r\nwhile splash:evaljs('!!document.querySelector(\"#link\")') do\r\n    assert(splash:runjs(\"utils.click('#link')\")))\r\nend\r\n```"}}