Skip to content

Applying suggestion for table cell element query yields no results聽#334

Description

@ulisses-alves

Bug Report 馃悰

Hi there
I have a simple table structure where I wanted to select its first cell. While applying a better selector suggested by the application, it no longer selects the element.

To Reproduce 鉁旓笍

  1. Enter the following HTML
<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>E-mail</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>foo</td>
      <td>foo@bar.foo</td>
    </tr>
  </tbody>
</table>
  1. Enter the following selector
screen.getByText('foo')
  1. The application then suggests
screen.getByRole('cell', { name: /foo/i })
  1. Apply the aforementioned suggestion
  2. No element is found

Expected behavior 馃

The element <td>foo</td> should be selected

Your Environment 馃捇

  • browser: Firefox
  • os: Windows

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions