[Selenium] Build Up an Selenium-Cucumber testing environment

下午1:57

How to Build up selenium-cucumber environment on MAC



Setup Selenium on MAC

Make sure your java and homebrew is setup
 mkdir -p ~/Selenium && cd $_ 
 curl -S -s -L https://goo.gl/s519kT > run-selenium 
 chmod +x run-selenium && mv run-selenium /usr/local/bin 
 run-selenium init 
Start Selenium
run-selenium start

Setup selenium-cucumber

You need to have Ruby installed. Verify your installation by running ruby -v in a terminal - it should print “ruby 1.9.3” (or higher).
Install selenium-cucumber gem by running
gem install selenium-cucumber

Clone selenium-cucumber for ruby

git clone https://github.com/selenium-cucumber/selenium-cucumber-ruby.git

Run selenium-cucumber Gmail example

cd ./selenium-cucumber-ruby/example/desktop web/desktop_web_gmail_login
cucumber BROWSER=chrome

Reference

You Might Also Like

0 意見