I have been using Cucumber and Webrat for a while. I now need to start writing behaviour that involve AJAX interactions so I was thinking to use the Selenium adapter for Webrat. Can anyone point out a easy and updated step-by-step guide for installing and configuring selenium+webrat+cucumber? I would like to be able to mix javascript scenario with non-javascript scenarios.
相关问题
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- Selecting an item from a combo box selenium driver
- Eager-loading association count with Arel (Rails 3
- Selenium in Java is not finding element when using
I'm using Selenium with rspec on my project and generate code from a custom formatter for Selenium IDE.
There is many selenium for rails but i success using Selenium-RC http://seleniumhq.org/download/ , so download to your pc.
Here are my steps:
Now, You just export spec to your spec folder for me, I use spec/features/xxxx_spec.rb see code below.
Very similar approach can find at here
For webrat+cucumber, the latest Rspec book will give all you need. (They don't have selenium + cucumber chapter finish yet)
example