2

I'm working on an open source library, but some of the functionality requires that I emulate a browser. I hear it's possible to launch an instance of the browser, but if I'm running on linux, I don't think all browsers will be available, and vice versa, safari wouldn't be available on anything but a Mac. So is there a browser emulator that sys admins here know of, preferably something open source because I'm working on open source code.

Any possible solutions I'm overlooking?

Please forgive me if I'm not upvoting helpful answers. My rep is below the level required to upvote. But thank you nonetheless.

  • possible duplicate of stackoverflow.com/questions/2073481/… – ephemient Dec 5 '10 at 4:28
  • @ephemient, well, if I want to render the data to a png like OneOfOne suggests, then that method wouldn't work. Would it? – park Dec 5 '10 at 4:49
  • can you be more specific? do you want browser code to manipulate cookies? run javascript? automate form submissions? – Brad Clawsie Dec 5 '10 at 5:01
  • @brad, For starters, I'd want to take a screenshot to a png. – park Dec 5 '10 at 5:14
  • take a screenshot of what? many sites require javascript to be run for the page to render. – Brad Clawsie Dec 5 '10 at 6:53
3

Have you looked at Selenium?

1

Well, you can always embed a browser in your code, like WebKit (Qt4), there are ports to almost all languages.

Also in recent linux distros you can do xdg-open http://url to open the default browser.

You can use webkit to render the data to a png or such.

  • I wish I could upvote answers here, but my rep is too low to upvote. – park Dec 5 '10 at 4:43
  • if my answer helped you, you can select it. – OneOfOne Dec 5 '10 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.