Sha256: eabfa404e2190543683f4ca99d12253e71c878b65b41ab0822a156cbb150a943
Contents?: true
Size: 1.25 KB
Versions: 16
Compression:
Stored size: 1.25 KB
Contents
require_relative './commands' module Scoutui::Commands class LoadJs < Command def execute(drv, e=nil) puts __FILE__ + (__LINE__).to_s + " LoadJs.execute(#{e})" @drv=drv if !drv.nil? rc=false js="" _req = Scoutui::Utils::TestUtils.instance.getReq() begin Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " LoadJs()" if e['page'].has_key?('files') e['page']['files'].each do |_js| Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " => #{_js}" f = File.open(_js, 'r') js << f.read end end if e['page'].has_key?('id') Scoutui::Base::TestData.instance.addJS(e['page']['id'].to_s, js) end rc=true rescue => ex Scoutui::Logger::LogMgr.instance.warn "Error during processing: #{ex}" Scoutui::Logger::LogMgr.instance.warn "Backtrace:\n\t#{ex.backtrace.join("\n\t")}" end if rc Scoutui::Logger::LogMgr.instance.asserts.info "Verify requirements command passed - #{rc}" Testmgr::TestReport.instance.getReq(_req).testcase('click').add(rc, "Verify requirements command passed") end setResult(rc) end end end
Version data entries
16 entries across 16 versions & 1 rubygems