O'Reilly logo

Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites by Gigi Sayfan, Kevin Dangoor, Mark Ramm

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 21.4. Selenium

Mechanize is great but sometimes you need to be able to see the test with your own eyes to make sure everything is correct and placed in the right place. Selenium is a great tool that helps you run tests inside the browser. You install Selenium into your web server. We recommend /static/selenium in your TurboGears project. Make sure that the following section is in your config/app.cfg. It should be included by default:

[/static]
static_filter.on = True
static_filter.dir = "%(top_level_dir)s/static"

Selenium works by injecting JavaScript code into your application that executes in the browser on the client side. The benefit is that Selenium’s code can interact very intimately with the HTML DOM of your application. You ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required