Sha256: 8a28bc9dd74af6f3e69da32f2f9a3513f8146f9c1569fe7f0bc096d1e7cd25c7

Contents?: true

Size: 700 Bytes

Versions: 5

Compression:

Stored size: 700 Bytes

Contents

require 'watirspec_helper'

describe 'Element' do
  context 'drag and drop', except: {browser: :ie} do
    before { browser.goto WatirSpec.url_for('drag_and_drop.html') }

    let(:draggable) { browser.div id: 'draggable' }
    let(:droppable) { browser.div id: 'droppable' }

    it 'can drag and drop an element onto another' do
      expect(droppable.text).to include 'Drop here'
      draggable.drag_and_drop_on droppable
      expect(droppable.text).to include 'Dropped!'
    end

    it 'can drag an element by the given offset' do
      expect(droppable.text).to include 'Drop here'
      draggable.drag_and_drop_by 200, 50
      expect(droppable.text).to include 'Dropped!'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
watir-7.0.0 spec/watirspec/drag_and_drop_spec.rb
watir-7.0.0.beta5 spec/watirspec/drag_and_drop_spec.rb
watir-7.0.0.beta4 spec/watirspec/drag_and_drop_spec.rb
watir-7.0.0.beta3 spec/watirspec/drag_and_drop_spec.rb
watir-7.0.0.beta2 spec/watirspec/drag_and_drop_spec.rb