0.0
No commit activity in last 3 years
No release in over 3 years
Watir::Wait::Timer implementation compatible with Timecop
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0
>= 0

Runtime

 Project Readme

watir-timecop Gem Version Build Status

Since Watir 6.0 its internal timer class no longer has the issue watir-timecop tries to workaround. If you use Watir 6.0 and Ruby 2.3, you don't need this gem. See watir/watir#486 for details.

Makes Timecop compatible with Watir.

The problem is that internally Watir uses Time.now when it waits for element presence/absence. Combined with Timecop, waiting gets broken because Time.now may always returns the same value. This gem implements custom timer for Watir, which uses simple counter instead.

Installation

Add this line to your application's Gemfile:

gem 'watir-timecop'

And then execute:

$ bundle

Or install it yourself as:

$ gem install watir-timecop

Usage

Just require gem after Watir. That's all!

require 'watir-webdriver'
require 'watir-timecop'

Contributing

  1. Fork it ( http://github.com/p0deje/watir-timecop/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2016 Alex Rodionov. See LICENSE.txt for details.