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.5.5 lib/scoutui/commands/fill_form.rb
scoutui-2.0.5.4 lib/scoutui/commands/fill_form.rb
scoutui-2.0.5.2.1.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.5.3 lib/scoutui/commands/fill_form.rb
scoutui-2.0.5.2 lib/scoutui/commands/fill_form.rb
scoutui-2.0.5.1.1.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.5.1 lib/scoutui/commands/fill_form.rb
scoutui-2.0.5.0.1.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.5.0 lib/scoutui/commands/fill_form.rb
scoutui-2.0.4.2.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.4.1.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.4.0 lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.57.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.56.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.55.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.54.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.53.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.52.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.51.pre lib/scoutui/commands/fill_form.rb
scoutui-2.0.3.50.pre lib/scoutui/commands/fill_form.rb