2

I am new to Python coding and i am trying to open a web page using python. I used web browser.open to open the web page. After i opened the web page i want to click a tab called "Submit" on the web page when the timer on the page reaches zero. If i get a error then it should return to the original page without any user interaction. Is this possible?

Thanks

2
  • 1
    Whats with the vote to close, this looks like a real question... Commented Nov 23, 2010 at 1:18
  • @Token MacGuy. It was a misfire on my part. I missed part of it. At least I could undo my initial -1. Commented Nov 23, 2010 at 2:08

3 Answers 3

3

Instead of using that particular module, maybe you want to use Selenium RC, which has python bindings.

Sign up to request clarification or add additional context in comments.

Comments

2

This will depend on if you need to use a "real" browser application to do this. Can you explain what you are trying to do in a bit more detail?

Anyway...

If you need a "real" browser to launch and make these requests, then the Selenium RC package is what you need.

On the other hand, if it's OK that Python does all the page loading internally, then the popular Mechanize module should do the trick.

To Explain:

If you are depending on a complex JavaScript powered page, then you must use Selenium. If it's just HTML stuff, then Mechanize can emulate it all inside python.

Hope this helps. If so, mark this answered and let me know. :-)

2 Comments

I would like to use real browser as I need to input other details after the programs hits "submit" button. I think it is a complex java script page. I am trying to automate a bidding page using python.
Yep, so you will need Selenium. It does support Python. If you dont like Selenium, you can try Greasemonkey for Firefox. (But that is Javascript.) If my answer helps, please mark as answered. Thanks. :-)
1

This is what mechanize is for: http://wwwsearch.sourceforge.net/mechanize/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.