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

Search Discussions

  • Matteo Landi at Oct 9, 2010 at 10:53 am
    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
    On Sat, Oct 9, 2010 at 11:39 AM, Johny wrote:
    Is it possible to control any webbrowser from Python ? For example to
    issue http POST and GET ?command
    Thanks
    Johny
    --
    http://mail.python.org/mailman/listinfo/python-list


    --
    Matteo Landi
    http://www.matteolandi.net/
  • Emmanuel Surleau at Oct 9, 2010 at 1:17 pm

    Is it possible to control any webbrowser from Python ? For example to
    issue http POST and GET command
    Thanks
    Johny
    http://docs.python.org/library/webbrowser.html

    The control you get is rather limited, though. If your aim is interacting with
    a website, though, you can try urllib/urllib2 for simple things, and Mechanize
    ( http://wwwsearch.sourceforge.net/mechanize/ ) or Twill (
    http://twill.idyll.org/ ) for more complex operations.

    Cheers,

    Emm
  • Tim Harig at Oct 9, 2010 at 3:17 pm

    On 2010-10-09, Johny wrote:
    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.
  • Johny at Oct 9, 2010 at 5:34 pm

    On Oct 9, 5:17?pm, Tim Harig wrote:
    On 2010-10-09, Johny wrote:

    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.
    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)
  • Diez B. Roggisch at Oct 9, 2010 at 8:08 pm

    Johny <python at hope.cz> writes:
    On Oct 9, 5:17?pm, Tim Harig wrote:
    On 2010-10-09, Johny wrote:

    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.
    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
  • Luca at Oct 10, 2010 at 9:30 pm

    On Oct 9, 11:39?am, Johny wrote:
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedOct 9, '10 at 9:39a
activeOct 10, '10 at 9:30p
posts7
users6
websitepython.org

People

Translate

site design / logo © 2022 Grokbase