Sha256: b72fb51d48012b6eabb14729353043644087f78fd09f3b509b09eaded2da055b

Contents?: true

Size: 980 Bytes

Versions: 46

Compression:

Stored size: 980 Bytes

Contents

module RubyJmeter
  class DSL
    def http_cookie_manager(params={}, &block)
      node = RubyJmeter::HttpCookieManager.new(params)
      attach_node(node, &block)
    end
  end

  class HttpCookieManager
    attr_accessor :doc
    include Helper

    def initialize(params={})
      testname = params.kind_of?(Array) ? 'HttpCookieManager' : (params[:name] || 'HttpCookieManager')
      @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="#{testname}" enabled="true">
  <collectionProp name="CookieManager.cookies"/>
  <boolProp name="CookieManager.clearEachIteration">false</boolProp>
  <stringProp name="CookieManager.policy">default</stringProp>
  <stringProp name="CookieManager.implementation">org.apache.jmeter.protocol.http.control.HC4CookieHandler</stringProp>
</CookieManager>)
      EOS
      update params
      update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
    end
  end

end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
ruby-jmeter-3.0.1 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-3.0.0 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.10 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.9 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.8 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.7 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.6 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.5 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.4 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.3 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.2 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.1 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.13.0 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.12.5 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.12.4 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.12.3 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.12.2 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.12.1 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.12.0 lib/ruby-jmeter/dsl/http_cookie_manager.rb
ruby-jmeter-2.11.22 lib/ruby-jmeter/dsl/http_cookie_manager.rb