469,281 Members | 2,486 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,281 developers. It's quick & easy.

Put a url in a browsers address bar

Dear All,

I would like to place a url in my browsers address bar, then execute.
How can do this?

e.g.

def goToGoogle():
url = "www.google.com"
b = openBrowser()
b.goToUrl(url)
return True

Thanks for any help

Colin
Aug 18 '05 #1
6 2131

On Thu, 18 Aug 2005 12:01:16 -0400, Colin Gillespie
<c.*********@ncl.ac.uk> wrote:
I would like to place a url in my browsers address bar, then execute.
How can do this?

e.g.

def goToGoogle():
url = "www.google.com"
b = openBrowser()
b.goToUrl(url)
return True


def goToGoogle():
import webbrowser
webbrowser.open("www.google.com");

Alan
Aug 18 '05 #2
>
I would like to place a url in my browsers address bar, then execute.
How can do this?


def goToGoogle():
import webbrowser
webbrowser.open("www.google.com");


Thanks for the quick reply. Do you know what module I would use to fill
out a form on an open web page?

Thanks

Colin
Aug 18 '05 #3
Colin Gillespie wrote:
I would like to place a url in my browsers address bar, then execute.
How can do this?


def goToGoogle():
import webbrowser
webbrowser.open("www.google.com");


Thanks for the quick reply. Do you know what module I would use to fill
out a form on an open web page?


The answer involves Google again, but this time it is "Use Google Groups
to search the archives for previous answers to questions like yours",
which is good advice to follow most of the time when you have a question
that seems likely to have been asked before.

Try this search pattern for a start "python fill out form on web page".

(Note, Google Groups, not just Google.)

-Peter
Aug 18 '05 #4
Colin Gillespie wrote:
I would like to place a url in my browsers address bar, then execute.
How can do this?


def goToGoogle():
import webbrowser
webbrowser.open("www.google.com");

Thanks for the quick reply. Do you know what module I would use to fill
out a form on an open web page?

Thanks

Colin

You could take a look at John Lee's ClientForm module. Start at

http://wwwsearch.sourceforge.net/ClientForm/

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Aug 18 '05 #5
Colin Gillespie wrote:
I would like to place a url in my browsers address bar, then execute.
How can do this?


def goToGoogle():
import webbrowser
webbrowser.open("www.google.com");

Thanks for the quick reply. Do you know what module I would use to fill
out a form on an open web page?

Thanks

Colin

Oops. ClientForm expects you to be interacting directly with the server,
not driving an open browser window. To do the same thing through the
browser would involve using COM, I suspect. If so be careful, as what
you implement may end up being browser-specific.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Aug 18 '05 #6
ina
Here is a start.

http://www.ishpeck.net/?P=pytesting
This is all stuff based on windos.

Colin Gillespie wrote:
Dear All,

I would like to place a url in my browsers address bar, then execute.
How can do this?

e.g.

def goToGoogle():
url = "www.google.com"
b = openBrowser()
b.goToUrl(url)
return True

Thanks for any help

Colin


Aug 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by The wee free man | last post: by
9 posts views Thread by chadlupkes | last post: by
3 posts views Thread by =?Utf-8?B?TWFyaw==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.