diff options
Diffstat (limited to 'qa/qa/page/base.rb')
-rw-r--r-- | qa/qa/page/base.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb index b01b4951738..dcba4fc8544 100644 --- a/qa/qa/page/base.rb +++ b/qa/qa/page/base.rb @@ -81,8 +81,8 @@ module QA find_element(name, class: 'active') end - def all_elements(name) - all(element_selector_css(name)) + def all_elements(name, **kwargs) + all(element_selector_css(name), **kwargs) end def check_element(name) @@ -206,12 +206,7 @@ module QA end def within_element_by_index(name, index) - # Finding all elements can be flaky if the elements don't all load - # immediately. So we wait for any to appear before trying to find a - # specific one. - has_element?(name) - - page.within all_elements(name)[index] do + page.within all_elements(name, minimum: index + 1)[index] do yield end end |