mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Use wait_for in drag method
This commit is contained in:
parent
3eea2c2639
commit
962a66b1e0
1 changed files with 2 additions and 2 deletions
|
@ -44,9 +44,9 @@ module Capybara
|
|||
end
|
||||
|
||||
def drag(source_locator, target_locator)
|
||||
source = find(source_locator)
|
||||
source = wait_for(source_locator)
|
||||
raise Capybara::ElementNotFound, "drag source '#{source_locator}' not found on page" unless source
|
||||
target = find(target_locator)
|
||||
target = wait_for(target_locator)
|
||||
raise Capybara::ElementNotFound, "drag target '#{target_locator}' not found on page" unless target
|
||||
source.drag_to(target)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue