{"record":{"id":"f793588fb687562e","repo":"teamcapybara/capybara","slug":"attempt-to-set-readonly-element-with-value-valu","errorCode":null,"errorMessage":"Attempt to set readonly element with value: #{value}","messagePattern":"Attempt to set readonly element with value: #(.+?)","errorType":"exception","errorClass":"Capybara::ReadOnlyElementError","httpStatus":null,"severity":"error","filePath":"lib/capybara/node/element.rb","lineNumber":119,"sourceCode":"      ##\n      #\n      # @return [String]    The value of the form element\n      #\n      def value\n        synchronize { base.value }\n      end\n\n      ##\n      #\n      # Set the value of the form element to the given value.\n      #\n      # @param [String] value    The new value\n      # @param [Hash] options    Driver specific options for how to set the value. Take default values from {Capybara.configure default_set_options}.\n      #\n      # @return [Capybara::Node::Element]  The element\n      def set(value, **options)\n        if ENV.fetch('CAPYBARA_THOROUGH', nil) && readonly?\n          raise Capybara::ReadOnlyElementError, \"Attempt to set readonly element with value: #{value}\"\n        end\n\n        options = session_options.default_set_options.to_h.merge(options)\n        synchronize { base.set(value, **options) }\n        self\n      end\n\n      ##\n      #\n      # Select this node if it is an option element inside a select tag.\n      #\n      # @!macro action_waiting_behavior\n      #   If the driver dynamic pages (JS) and the element is currently non-interactable, this method will\n      #   continuously retry the action until either the element becomes interactable or the maximum\n      #   wait time expires.\n      #\n      #   @param [false, Numeric] wait\n      #     Maximum time to wait for the action to succeed. Defaults to {Capybara.configure default_max_wait_time}.","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/teamcapybara/capybara/blob/15b5fdb76e972e9623d5af2123ed3755594f9732/lib/capybara/node/element.rb#L101-L137","documentation":"Error \"Attempt to set readonly element with value: #{value}\" thrown in teamcapybara/capybara.","triggerScenarios":"Thrown at lib/capybara/node/element.rb:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"15b5fdb76e972e9623d5af2123ed3755594f9732","analyzedAt":"2026-08-21T16:53:45.588Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}