omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Interact with Javascript in Pythonista

    Pythonista
    2
    3
    2584
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • teeter
      teeter last edited by

      Does anyone know how to interact with Javascript in Pythonista? I use PhantomJS and Selenium on my desktop, but cannot for the life of me figure out how to get it working with Mechanize. I really just need to click accept on a modal and can't figure out how to do it without PhantomJS or Selenium. I tried setting the cookie to "accepted" and some other things, nothing is working. Any help is appreciated!

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        use a ui.WebView instead of mechanize. This also lets you evaluate arbitrary js.

        1 Reply Last reply Reply Quote 2
        • teeter
          teeter last edited by

          This worked great. Thank you!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors