Sha256: 483f9d9e00d16024562f2425cbeb3df85e6cdc9cc69ac6b9af67c59611dbe973

Contents?: true

Size: 771 Bytes

Versions: 20

Compression:

Stored size: 771 Bytes

Contents

require 'watirspec_helper'

describe 'TextArea' do
  before :each do
    browser.goto WatirSpec.url_for('forms_with_input_elements.html')
  end

  context 'when locating by :value' do
    before(:each) do
      browser.textarea(index: 0).set 'foo1'
      browser.textarea(index: 1).set 'foo2'
    end

    it 'finds textareas by string' do
      expect(browser.textareas(value: 'foo1').map(&:id)).to eq [browser.textarea(index: 0).id]
      expect(browser.textareas(value: 'foo2').map(&:id)).to eq [browser.textarea(index: 1).id]
    end

    it 'finds textareas by regexp' do
      expect(browser.textareas(value: /foo/)[0].id).to eq browser.textarea(index: 0).id
      expect(browser.textareas(value: /foo/)[1].id).to eq browser.textarea(index: 1).id
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
watir-7.1.0 spec/watirspec/elements/textareas_spec.rb
watir-7.0.0 spec/watirspec/elements/textareas_spec.rb
watir-7.0.0.beta5 spec/watirspec/elements/textareas_spec.rb
watir-7.0.0.beta4 spec/watirspec/elements/textareas_spec.rb
watir-7.0.0.beta3 spec/watirspec/elements/textareas_spec.rb
watir-7.0.0.beta2 spec/watirspec/elements/textareas_spec.rb
watir-7.0.0.beta1 spec/watirspec/elements/textareas_spec.rb
watir-6.19.1 spec/watirspec/elements/textareas_spec.rb
watir-6.19.0 spec/watirspec/elements/textareas_spec.rb
watir-6.18.0 spec/watirspec/elements/textareas_spec.rb
watir-6.17.0 spec/watirspec/elements/textareas_spec.rb
watir-6.16.5 spec/watirspec/elements/textareas_spec.rb
watir-6.16.4 spec/watirspec/elements/textareas_spec.rb
watir-6.16.3 spec/watirspec/elements/textareas_spec.rb
watir-6.16.2 spec/watirspec/elements/textareas_spec.rb
watir-6.16.1 spec/watirspec/elements/textareas_spec.rb
watir-6.16.0 spec/watirspec/elements/textareas_spec.rb
watir-6.15.1 spec/watirspec/elements/textareas_spec.rb
watir-6.15.0 spec/watirspec/elements/textareas_spec.rb
watir-6.14.0 spec/watirspec/elements/textareas_spec.rb