Python Forum

Full Version: With SplashRequest to run javascript onclick function to render page properly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I need to call javascript function with my SplashRequest.
This javascript I need to execute before page is render
<a href="#" onclick="submitCreateReservation('ypsForm:j_id205','O-0-0-0');">option</a>

How should I code my SplashRequest?

yield SplashRequest(
    'http://example.com',
    endpoint='render.html',
    args={'js_source': 'document.title="My Title";'})