Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automate firefox with python? [closed]

Been scouring the net for something like firewatir but for python. I'm trying to automate firefox on linux. Any suggestions?

like image 899
RyanBrady Avatar asked Sep 12 '08 23:09

RyanBrady


People also ask

Does selenium work with Firefox?

Mozilla Firefox is one of the most widely used browsers in the world. It has enhanced features and is supported by a multitude of the latest testing tools and techniques. One such tool is Selenium. Selenium uses Firefox Driver to link the test cases with the Firefox browser.


5 Answers

You could try selenium.

like image 136
Tyler Avatar answered Oct 26 '22 06:10

Tyler


The PyXPCOM extension is one possibility.

But looking at what firewatir provides, I have to 2nd the suggestion for twill. It's based on mechanize, which might also be useful in this context.

like image 30
Matthew Trevor Avatar answered Oct 26 '22 05:10

Matthew Trevor


I use Selenium RC. All my tests are written in Python and are run with test suite.

One minor thing is that You either have to start selenium manually and point Your tests to it or start selenium from test suite which requires little bit of coding. But it's doable.

Generally I'm very pleased with this solution.

like image 22
Łukasz Avatar answered Oct 26 '22 06:10

Łukasz


See if twill can help you. It can be used as a command line tool or as a python library.

like image 44
Toni Ruža Avatar answered Oct 26 '22 05:10

Toni Ruža


I would suggest you to use Selenium instead of Mechanize/Twill because Mechanize would fail while handling Javascript.

like image 35
theharshest Avatar answered Oct 26 '22 05:10

theharshest