Sha256: d337387bfffa9b8f79fbe01cc530bd4a48edc77966241cd3bec5f8f7800a8f6d
Contents?: true
Size: 917 Bytes
Versions: 5
Compression:
Stored size: 917 Bytes
Contents
# frozen_string_literal: true require 'eac_templates/core_ext' module Aranha module Selenium class Session < ::SimpleDelegator class FormRequest acts_as_instance_method common_constructor :session, :path, :verb, :fields do self.fields = ::Aranha::Selenium::Session::FormRequest::Field.assert_all(fields) end def result session.execute_script(script.pretty_debug) end private # @return [String] def script template.child('form_request_function.js').apply(script_args: script_args) end # @return [String] def script_args ["'#{path}'", "'#{verb}'", script_fields_arg].join(', ') end # @return [String] def script_fields_arg "{#{fields.map(&:to_js_object).join(', ')}}" end require_sub __FILE__ end end end end
Version data entries
5 entries across 5 versions & 1 rubygems