{"record":{"id":"f61241e19eb54388","repo":"teamcapybara/capybara","slug":"getting-visible-text-is-not-currently-supported-di","errorCode":null,"errorMessage":"Getting visible text is not currently supported directly on shadow roots","messagePattern":"Getting visible text is not currently supported directly on shadow roots","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"lib/capybara/selenium/node.rb","lineNumber":15,"sourceCode":"# frozen_string_literal: true\n\n# Selenium specific implementation of the Capybara::Driver::Node API\n\nrequire 'capybara/selenium/extensions/find'\nrequire 'capybara/selenium/extensions/scroll'\nrequire 'capybara/node/whitespace_normalizer'\n\nclass Capybara::Selenium::Node < Capybara::Driver::Node\n  include Capybara::Node::WhitespaceNormalizer\n  include Capybara::Selenium::Find\n  include Capybara::Selenium::Scroll\n\n  def visible_text\n    raise NotImplementedError, 'Getting visible text is not currently supported directly on shadow roots' if shadow_root?\n\n    native.text\n  end\n\n  def all_text\n    text = driver.evaluate_script('arguments[0].textContent', self) || ''\n    normalize_spacing(text)\n  end\n\n  def [](name)\n    native.attribute(name.to_s)\n  rescue Selenium::WebDriver::Error::WebDriverError\n    nil\n  end\n\n  def value\n    if tag_name == 'select' && multiple?\n      native.find_elements(:css, 'option:checked').map { |el| el[:value] || el.text }","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/teamcapybara/capybara/blob/15b5fdb76e972e9623d5af2123ed3755594f9732/lib/capybara/selenium/node.rb#L1-L33","documentation":"Error \"Getting visible text is not currently supported directly on shadow roots\" thrown in teamcapybara/capybara.","triggerScenarios":"Thrown at lib/capybara/selenium/node.rb:15 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"}