Control webbrowser from Python script

J

Johny

Is it possible to control any webbrowser from Python ? For example to
issue http POST and GET command
Thanks
Johny
 
M

Matteo Landi

Well, if you need to issue http POST/GET commands, you can take a look
at urllib/urllib2 modules. Instead if you want to take control of the
web-browser I've heard about selenium, but I've never used it.

Best regards,
Matteo
 
E

Emmanuel Surleau

T

Tim Harig

Is it possible to control any webbrowser from Python ? For example to
issue http POST and GET command

The most reliable way to interact with a webserver is through the urllib
and httplib modules. This is effective for 99% of cases. I do understand
that some sites heavy in javascript can be difficult to figure out how to
make valid requests. On win32 you can automate Internet Explorer through
its InternetExplorer.Application COM interface which is fully documented at
the MSDN site. On other operating systems, Firefox can be accessed using
its XPCOM interface.
 
J

Johny

The most reliable way to interact with a webserver is through the urllib
and httplib modules.  This is effective for 99% of cases.  I do understand
that some sites heavy in javascript can be difficult to figure out how to
make valid requests.  On win32 you can automate Internet Explorer through
its InternetExplorer.Application COM interface which is fully documented at
the MSDN site.  On other operating systems, Firefox can be accessed using
its XPCOM interface.

Thanks ALL who replied.I wanted to use directly httplib modul and I
started with it.But webserver uses SSL communication.
Of course, I can use https protocol but the communication between
server and client( browser) is so complicated that I was unable to
simulate that with python script.So I think I could do that with
webbrowser directly ( control webbrowser from a python script)
 
D

Diez B. Roggisch

Johny said:
Thanks ALL who replied.I wanted to use directly httplib modul and I
started with it.But webserver uses SSL communication.
Of course, I can use https protocol but the communication between
server and client( browser) is so complicated that I was unable to
simulate that with python script.So I think I could do that with
webbrowser directly ( control webbrowser from a python script)

What has HTTPS to do with this?

My tip for this problem: use FireBug and HTTP Live Headers to get an
idea what is really going on between Server & Browser.

Then model that with Python + urllib2.

Diez
 
L

luca

Is it possible to control any webbrowser from Python ? For example to
issue http POST and GET  command
Thanks
Johny

I'm using funkload and it is awesome!

http://funkload.nuxeo.org/

FunkLoad is a functional and load web tester, written in Python, whose
main use cases are:

Functional testing of web projects, and thus regression testing as
well.
Performance testing: by loading the web application and monitoring
your servers it helps you to pinpoint bottlenecks, giving a detailed
report of performance measurement.
Load testing tool to expose bugs that do not surface in cursory
testing, like volume testing or longevity testing.
Stress testing tool to overwhelm the web application resources and
test the application recoverability.
Writing web agents by scripting any web repetitive task, like checking
if a site is alive.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top