关于watir selenium和webdriver soda cucumber

watir和selenium在自动化测试web测试领域强硬增长。这一趋势日渐强势,各种搭配和框架丛生。简单的搜集,我看到了cucumber配合watir的框架,看到例教,和类似的测试集成框架,也看到分布式测试框架简单使用:安装

gem install watir-webdriver
require 'watir-webdriver'b = Watir::Browser.newb.goto 'bit.ly/watir-webdriver-demo'b.text_field(:id => 'entry_0').set 'your name'b.select_list(:id => 'entry_1').select 'Ruby'b.select_list(:id => 'entry_1').selected? 'Ruby'b.div(:class => 'ss-form-entry').button.clickb.text.include? 'Thank you'#webdriver通用watir语法browser.goto('http://myserver/mypage')# to enter text into a text field - assuming the field is named 'username'browser.text_field(:name, 'username').set('Paul')# if there was a text field that had an id of 'company_ID', you could set it to 'Ruby Co':browser.text_field(:id ,'company_ID').set('Ruby Co')# to click a button that has a caption of 'Cancel'ie.button(:value, 'Cancel').click

这一篇,夜猪希望开个头,加强关注这个领域,列一些资源,有机会的话更多学习和接触。资源一部分:书籍watirbookwatir-webdriver不同系统的安装简单应用watir Podcastwatir Cheat sheet快速差语法用watir不错的Tutorialsoda是用于测试nodejs的selenium client端selenium的client是之前夜猪自己就一直在用和cucumber配合用的。在测试的时候,很希望能停下来用firebug测debug一下,就会用到capybara-firebug

# located in features/support/capybara.rb or similarrequire 'capybara/firebug'Selenium::WebDriver::Firefox::Profile.firebug_version = '1.8.3'profile = Selenium::WebDriver::Firefox::Profile.newprofile.enable_firebugCapybara::Driver::Selenium.new(app,   :browser => :remote,   :url => "http://my.ip.add.ress:4444/wd/hub",   :desired_capabilities => Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile => profile))

待人对事不要太计较,如果太计较就会有悔恨!

关于watir selenium和webdriver soda cucumber

相关文章:

你感兴趣的文章:

标签云: