title: Trying to access some elements under shadow dom But using the javascript I am unable to access it
body: <p>I am trying to access the table elements under Shadow root but I am unable to access it.</p>
  <p>The structure is as shown below
  <a href="https://i.stack.imgur.com/zz8kU.png" rel="nofollow noreferrer">Structure of the shadow DOM</a></p>
  <p>I have tried below code but still having failure</p>
  <pre><code>${title}=    Get Row Count Under Shadow Root Element
  log    ${title}
  Close Browser
  </code></pre>
  <pre><code>import selenium
  from selenium import webdriver
  from robot.libraries.BuiltIn import BuiltIn
  
  def expand_shadow_element(driver, element):
    shadow_root = driver.execute_script('return arguments[0].shadowRoot', element)
    return shadow_root
  
  def get_row_count_under_shadow_root_element():
    seleniumlib = BuiltIn().get_library_instance('Selenium2Library')
    driver = seleniumlib.driver
  
    root1 = driver.find_element_by_tag_name('vaadin-grid')
    shadow_root1 = expand_shadow_element(driver, root1)
    row_count = shadow_root1.find_element_by_xpath(&quot;//div[@id='scroller']//table[@id='table']&quot;).get_attribute(&quot;aria-rowcount&quot;)
    # row_count = driver.find_element_by_xpath(&quot;//div[@id='scroller']&quot;).click()
  
    return  row_count  
  </code></pre>
  <p>Can someone guide me what is wrong in this.</p>
  <p>Also a working code would be really appreciated.</p>