Sha256: 3f8e9b4312c9f71227c56c772d049a0c5219a464f269150d178e6c840fc904f2

Contents?: true

Size: 801 Bytes

Versions: 1

Compression:

Stored size: 801 Bytes

Contents

require 'spec_helper'

describe 'Web Elements' do
  let(:watir_browser)    { mock_browser_for_watir }
  let(:watir_definition) { ::Fluent::WebElements::WebElement.new(watir_browser, :platform => :watir_webdriver) }

  it 'should perform a click event on a web element' do
    watir_browser.should_receive(:click)
    watir_definition.click
  end

  it 'should determine if a web element is enabled' do
    watir_browser.should_receive(:enabled?).twice.and_return(true)
    watir_definition.enabled?.should == true
    watir_definition.should be_enabled
  end

  it 'should determine if a web element is disabled' do
    watir_browser.should_receive(:enabled?).twice.and_return(false)
    watir_definition.disabled?.should == true
    watir_definition.should be_disabled
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-0.1.0 spec/web_element_spec.rb