Sha256: 99b94970aad9d9d9303a5a66c5eefe2e7a3aef60ac75d0b9b1fbb0155d92a86a

Contents?: true

Size: 1.33 KB

Versions: 71

Compression:

Stored size: 1.33 KB

Contents

require_relative './commands'

module Scoutui::Commands

  class FillForm < Command
    attr_accessor :form
    attr_accessor :formLocator
    attr_accessor :dut

    def initialize(_cmd)
      super(_cmd)

      @dut=nil

      Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + " form => #{@cmd}"
      @formLocator = @cmd.match(/fillform\((.*)\s*\)/)[1].to_s
      @form = Scoutui::Utils::TestUtils.instance.getForm(@formLocator)
      Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + " Form => #{@form}"
      @form.dump()
    end

    def fill(drv, dut)
      @drv=drv if !drv.nil?

      @form.fillForm(@drv, dut)
    end

    def execute(drv=nil)
      @drv=drv if !drv.nil?


      #_form = @cmd.match(/fillform\((.*)\s*\)/)[1].to_s
      #  _dut = _action.match(/fillform\(.*,\s*(.*)\)/)[1].to_s

      # dut = e['page']['dut']

      #  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " _dut => #{_dut}"
      Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + " DUT => #{@dut}"
      _rc=false
      begin
        _f = Scoutui::Utils::TestUtils.instance.getForm(@formLocator)
        _f.dump()
        _f.verifyForm(@drv)
        _f.fillForm(@drv, dut)
        _rc=true
      rescue
        ;
      end

      setResult(_rc)
    end

  end


end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
scoutui-2.0.3.49.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.48.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.47.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.46.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.45.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.44.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.43.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.42.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.41.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.40.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.39.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.38.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.37.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.36.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.35.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.34.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.33.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.32.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.31.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.30.pre lib/scoutui/commands/fill_form.rb