Sha256: 2aab53dae88ed8b51c963c9377fa1748cc1a56d6b286be89f35a3367fb20885b
Contents?: true
Size: 976 Bytes
Versions: 69
Compression:
Stored size: 976 Bytes
Contents
module RubyJmeter class DSL def xpath_assertion(params={}, &block) node = RubyJmeter::XpathAssertion.new(params) attach_node(node, &block) end end class XpathAssertion attr_accessor :doc include Helper def initialize(params={}) testname = params.kind_of?(Array) ? 'XpathAssertion' : (params[:name] || 'XpathAssertion') @doc = Nokogiri::XML(<<-EOS.strip_heredoc) <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="#{testname}" enabled="true"> <boolProp name="XPath.negate">false</boolProp> <stringProp name="XPath.xpath">/</stringProp> <boolProp name="XPath.validate">false</boolProp> <boolProp name="XPath.whitespace">false</boolProp> <boolProp name="XPath.tolerant">false</boolProp> <boolProp name="XPath.namespace">false</boolProp> </XPathAssertion>) EOS update params update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath] end end end
Version data entries
69 entries across 69 versions & 1 rubygems