Maintenance: Custom method Capybara::Node::Element#in_fixed_postion
is error prone due to a race condition because first check is performed without a sleep.
This commit is contained in:
parent
b58225a19a
commit
3bcd5e71a1
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ class Capybara::Node::Element
|
||||||
# @return [Capybara::Node::Element] the element/node
|
# @return [Capybara::Node::Element] the element/node
|
||||||
def in_fixed_postion(checks: 100)
|
def in_fixed_postion(checks: 100)
|
||||||
|
|
||||||
previous = native.location
|
previous = nil
|
||||||
(checks + 1).times do |check|
|
(checks + 1).times do |check|
|
||||||
raise "Element still moving after #{checks} checks" if check == checks
|
raise "Element still moving after #{checks} checks" if check == checks
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue