Skip to content

Instantly share code, notes, and snippets.

@titusfortner
Created December 11, 2015 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save titusfortner/07f6e5f66b2eb8e27983 to your computer and use it in GitHub Desktop.
Save titusfortner/07f6e5f66b2eb8e27983 to your computer and use it in GitHub Desktop.
# encoding: utf-8
#
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
require_relative '../spec_helper'
module Selenium
module WebDriver
module IE
describe "DesiredCapabilities" do
$DEBUG = true
it "has native events turned on by default" do
caps = driver.capabilities
expect(caps.native_events).to be true
end
it "has native events turned on unless native events is specifically set to false" do
driver.quit
sleep 3
driver2 = Selenium::WebDriver.for(:ie, native_events: nil)
expect(driver2.capabilities.native_events).to be true
driver2.quit
end
it "toggles native events off from direct initialization" do
driver.quit
sleep 3
driver2 = Selenium::WebDriver.for(:ie, native_events: false)
expect(driver2.capabilities.native_events).to be false
driver2.quit
end
it "toggles native events off from desired capabilities" do
driver.quit
sleep 3
driver2 = Selenium::WebDriver.for(:ie, {desired_capabilities: {native_events: false}})
expect(driver2.capabilities.native_events).to be false
driver2.quit
end
end
compliant_on :browser => :ie do
describe Driver do
it_behaves_like "driver that can be started concurrently", :ie
end
end
end # IE
end # WebDriver
end # Selenium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment