Is an empty cell in a table considered 'hidden' ?
See original GitHub issueDescribe 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:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
Empty cell is in my opinion visible. Empty html elements are used in many ways to visualize shapes etc.