No commit activity in last 3 years
No release in over 3 years
Watir::WaitWithRefresh extends Watir to include methods that will refresh the page until or while an element is present or a block is true. Adds Element#refresh_until_present, Element#refresh_while_present, Element#when_present_after_refresh, Browser#refresh_until and Browser#refresh_while.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

Watir::WaitWithRefresh

Watir::WaitWithRefresh extends Watir to include methods that will refresh the page until or while an element is present or a block is true.

Installation

gem install 'watir-wait_with_refresh'

Usage

The wait methods can be added after requiring Watir:

require 'watir' #or 'watir-classic' or 'watir-webdriver'
require 'watir/wait_with_refresh'

Refresh the page until an element is present:

 element.refresh_until_present

Refresh the page while an element is present:

element.refresh_while_present

Do something after refreshing the page makes the element present:

element.when_present_after_refresh.text

Refresh the page until a block evaluates as true:

browser.refresh_until{ browser.div.present? }

Refresh the page while a block evaluates as true:

browser.refresh_while{ browser.div.present? }

A timeout can also be specified for each of the methods:

element.refresh_until_present(5)