{"record":{"id":"f1a5b25004737a55","repo":"teamcapybara/capybara","slug":"expected-actual-title-inspect-to-verb-ex","errorCode":null,"errorMessage":"expected #{@actual_title.inspect} to #{verb} #{@expected_title.inspect}","messagePattern":"expected #(.+?) to #(.+?) #(.+?)","errorType":"exception","errorClass":"Capybara::ExpectationNotMet","httpStatus":null,"severity":"error","filePath":"lib/capybara/node/document_matchers.rb","lineNumber":21,"sourceCode":"module Capybara\n  module Node\n    module DocumentMatchers\n      ##\n      # Asserts that the page has the given title.\n      #\n      # @!macro title_query_params\n      #   @overload $0(string, **options)\n      #     @param string [String]           The string that title should include\n      #   @overload $0(regexp, **options)\n      #     @param regexp [Regexp]           The regexp that title should match to\n      #   @option options [Numeric] :wait (Capybara.default_max_wait_time) Maximum time that Capybara will wait for title to eq/match given string/regexp argument\n      #   @option options [Boolean] :exact (false) When passed a string should the match be exact or just substring\n      # @raise [Capybara::ExpectationNotMet] if the assertion hasn't succeeded during wait time\n      # @return [true]\n      #\n      def assert_title(title, **options)\n        _verify_title(title, options) do |query|\n          raise Capybara::ExpectationNotMet, query.failure_message unless query.resolves_for?(self)\n        end\n      end\n\n      ##\n      # Asserts that the page doesn't have the given title.\n      #\n      # @macro title_query_params\n      # @raise [Capybara::ExpectationNotMet] if the assertion hasn't succeeded during wait time\n      # @return [true]\n      #\n      def assert_no_title(title, **options)\n        _verify_title(title, options) do |query|\n          raise Capybara::ExpectationNotMet, query.negative_failure_message if query.resolves_for?(self)\n        end\n      end\n\n      ##\n      # Checks if the page has the given title.","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/teamcapybara/capybara/blob/15b5fdb76e972e9623d5af2123ed3755594f9732/lib/capybara/node/document_matchers.rb#L3-L39","documentation":"Error \"expected #{@actual_title.inspect} to #{verb} #{@expected_title.inspect}\" thrown in teamcapybara/capybara.","triggerScenarios":"Thrown at lib/capybara/node/document_matchers.rb:21 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"}