question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is an empty cell in a table considered 'hidden' ?

See original GitHub issue

Describe the bug I’m testing the visibility of cells in a table. Most of these cells have a value in the cell, and checking visibility of the cell is fine. I encountered a number of empty cells, which all fail the visible check. Like the reproduction script below.

My question: Is this expected behaviour ? I would reason that an empty cell is still visible. If this is expected behaviour, how should I check if cell is available ?

To Reproduce Steps to reproduce the behavior:

*** Settings ***
Library           Browser

*** Test Cases ***
Empty cell of table not Considered visible
    New Browser    browser=chromium headless=false
    New Context
    New Page    https://www.tutorialspoint.com/css/css_empty-cells.htm
    Browser.Wait For Elements State    //table[@class='empty']/tbody/tr[3]/td[2]    visible

Expected behavior See above

Screenshots not applicable

Desktop (please complete the following information):

  • OS: Windows
  • Browser robotframework 4.30(chromium)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
emakaaycommented, Apr 21, 2021

I expanded the test a little bit, and I can see that visible is checked correctly

`*** Settings *** Library Browser

*** Test Cases *** Empty cell of table not Considered visible New Browser browser=chromium headless=false New Context New Page https://www.tutorialspoint.com/css/css_empty-cells.htm # # Validate values can be read Get Text //html/body/div[1]/div/div[2]/iframe >>> body > table > tbody > tr:nth-child(2) > td:nth-child(2) == value Get Text //html/body/div[1]/div/div[2]/iframe >>> body > table > tbody > tr:nth-child(2) > td:nth-child(3) == value Get Text //html/body/div[1]/div/div[2]/iframe >>> body > table > tbody > tr:nth-child(3) > td:nth-child(2) == value Get Text //html/body/div[1]/div/div[2]/iframe >>> body > table > tbody > tr:nth-child(3) > td:nth-child(3) ==
# # Validate fields are visible Wait For Elements State //html/body/div[1]/div/div[2]/iframe >>> body > table > tbody > tr:nth-child(2) > td:nth-child(2) visible Wait For Elements State //html/body/div[1]/div/div[2]/iframe >>> body > table > tbody > tr:nth-child(2) > td:nth-child(3) visible Wait For Elements State //html/body/div[1]/div/div[2]/iframe >>> body > table > tbody > tr:nth-child(3) > td:nth-child(2) visible Wait For Elements State //html/body/div[1]/div/div[2]/iframe >>> body > table > tbody > tr:nth-child(3) > td:nth-child(3) visible`

I have to look closely at the other tests, to see why they fail. It looks the same. But this issue can be closed

0reactions
mkorpelacommented, Apr 21, 2021

Empty cell is in my opinion visible. Empty html elements are used in many ways to visualize shapes etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Display empty cells, null (#N/A) values, and hidden worksheet ...
By default, data that is hidden in rows and columns in the worksheet is not displayed in a chart, and empty cells or...
Read more >
empty-cells - CSS: Cascading Style Sheets - MDN Web Docs
The empty-cells CSS property sets whether borders and backgrounds appear around <table> cells that have no visible content.
Read more >
empty-cells - Codrops
A value of hide means that no borders or backgrounds are drawn around/behind empty cells. Furthermore, if all the cells in a row...
Read more >
Empty cells in HTML tables - Jukka K. Korpela
Empty cells in tables often cause problems to HTML authors. Browsers may display such cells without border even if the other cells have ......
Read more >
How can I hide empty html table cells with jQuery?
This works only if all TD cells are blank for a particular column. Otherwise, if you remove the first cell, the remaining cells'...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found