Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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
show 1 more comment

2 Answers

Have you looked at Selenium?

share|improve this answer
add comment

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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