{"record":{"id":"4eb7789f8b1618e8","repo":"teamcapybara/capybara","slug":"you-must-specify-at-least-one-css-style","errorCode":null,"errorMessage":"You must specify at least one CSS style","messagePattern":"You must specify at least one CSS style","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/capybara/node/element.rb","lineNumber":88,"sourceCode":"      # @param  [Symbol] attribute     The attribute to retrieve\n      # @return [String]               The value of the attribute\n      #\n      def [](attribute)\n        synchronize { base[attribute] }\n      end\n\n      ##\n      #\n      # Retrieve the given CSS styles.\n      #\n      #     element.style('color', 'font-size') # => Computed values of CSS 'color' and 'font-size' styles\n      #\n      # @param [Array<String>] styles   Names of the desired CSS properties\n      # @return [Hash]            Hash of the CSS property names to computed values\n      #\n      def style(*styles)\n        styles = styles.flatten.map(&:to_s)\n        raise ArgumentError, 'You must specify at least one CSS style' if styles.empty?\n\n        begin\n          synchronize { base.style(styles) }\n        rescue NotImplementedError => e\n          begin\n            evaluate_script(STYLE_SCRIPT, *styles)\n          rescue Capybara::NotSupportedByDriverError\n            raise e\n          end\n        end\n      end\n\n      ##\n      #\n      # @return [String]    The value of the form element\n      #\n      def value\n        synchronize { base.value }","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/teamcapybara/capybara/blob/15b5fdb76e972e9623d5af2123ed3755594f9732/lib/capybara/node/element.rb#L70-L106","documentation":"Error \"You must specify at least one CSS style\" thrown in teamcapybara/capybara.","triggerScenarios":"Thrown at lib/capybara/node/element.rb:88 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"}