Skip to content

p0deje/watir-timecop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

(NOT MAINTAINED) Use Watir with Timecop

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages