Sha256: 4b0b1bf5e3ad5495fc9375724d485a039cabd009b4358fa1d04b2f54b06a1b59

Contents?: true

Size: 679 Bytes

Versions: 3

Compression:

Stored size: 679 Bytes

Contents

# frozen_string_literal: true

require 'watirspec_helper'

module Watir
  describe Font do
    before do
      browser.goto(WatirSpec.url_for('font.html'))
    end

    it 'finds the font element' do
      expect(browser.font(index: 0)).to exist
    end

    it 'knows about the color attribute' do
      expect(browser.font(index: 0).color).to eq '#ff00ff'
    end

    it 'knows about the face attribute' do
      expect(browser.font(index: 0).face).to eq 'Helvetica'
    end

    it 'knows about the size attribute' do
      expect(browser.font(index: 0).size).to eq '12'
    end

    it 'finds all font elements' do
      expect(browser.fonts.size).to eq 1
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
watir-7.3.0 spec/watirspec/elements/font_spec.rb
watir-7.2.2 spec/watirspec/elements/font_spec.rb
watir-7.2.1 spec/watirspec/elements/font_spec.rb