Sha256: 02fd48b0cf9c740698c7d70b66f4dd39facab370d68eb5a5418c8e15e9952447
Contents?: true
Size: 1.05 KB
Versions: 13
Compression:
Stored size: 1.05 KB
Contents
# frozen_string_literal: true RSpec.configure do |config| config.before(:each, :js => true) do config.rspeckled_logger.debug("Before Each - Start - #{__FILE__}") page.driver.reset! config.rspeckled_logger.debug("Before Each - End - #{__FILE__}") end # Focus The Browser on Activation config.around(:each, :js => true, :autofocus => true) do |example| config.rspeckled_logger.debug("Around Each - Start - #{__FILE__}") browser_name = example.metadata[:driver].to_s.capitalize ::Thread.new do sleep 1.5 ` osascript -e ' tell the application named "#{browser_name}" activate set theWindow to the first item of windows if index of theWindow is not 1 then set index to 1 set visible to false set visible to true end if end tell ' > /dev/null ` end example.run sleep example.metadata[:delay] config.rspeckled_logger.debug("Around Each - End - #{__FILE__}") end end
Version data entries
13 entries across 13 versions & 1 rubygems