Setup web automation with selenium-cucumber

Use selenium-cucumber to perform web automation

 

Install cucumber

gem install selenium-cucumber

If you are going to create a new folder, use following command

selenium-cucumber gen

and  you will find a folder call “features"

 

Running cucumber script commands

Basic run all features

cucumber

Run specific tags

cucumber --tags @ex1,@ex2,@ex3

Run specific features

cucumber ./features/ex.feature

Run cucumber with html report

cucumber --format html--report.html

Run script with different browser

open env.rb in support folder

change browser type

$browser_type = ENV['BROWSER'] || 'chrome' 
$browser_type = ENV['BROWSER'] || 'firefox'
廣告

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s