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.

"Table Should Contain" does not work properly

See original GitHub issue

Example code: *** Settings *** Library SeleniumLibrary #4.0.0

*** Variables *** ${url} https://www.w3schools.com/html/html_tables.asp ${customer_table} //table[@id=‘customers’]

*** Test Cases *** Sample test Open Browser ${url} browser=chrome Maximize browser window Element Should Be Visible ${customer_table} Table Should Contain ${customer_table} Each

Expected behavior and actual behavior

Expected: FAIL Actual: PASS

If there is given text on the page and even I provide ID of table for this keyword, then this keyword returns True. (table does not contain text) Table Should Contain is useless in that case because I can also use Page Should Contain to find text on the page. In my project, I have two tables on the page where one record is moved to the second table and I need to verify that.

Environment

Browser: Chrome 77.0.3865.90 Browser driver: ChromeDriver 2.42.591088 Operating System: Windows 10 17763.740 Libraries

  • Robot Framework: 3.1.2
  • Selenium: 3.141.0
  • SeleniumLibrary: 4.0.0
  • Interpreter: Python 3.7.4

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
aaltatcommented, Oct 10, 2019

Already fixed locally. Bug also revealed that that there is many other bugs in the same class and I am fixing all of those.

2reactions
aaltatcommented, Oct 10, 2019

Found the bug, it is in table element finder and Selenium documentation explains why it happens. Good catch, it has been there since 3.0 release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table row won't contain elements with position:absolute
It normally works fine using <div> s, except it will still behave this way when using display:table-row which I found out while testing,...
Read more >
5 Common table problems & its best solution - YouTube
Following are 5 most common problems encountered while working with tables in Ms Word. This video shows how to solve these problems in...
Read more >
Tables in HTML documents
Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media....
Read more >
How to Troubleshoot and Fix Excel Pivot Table Errors
How to troubleshoot and fix Excel pivot table errors, such as PivotTable field name is not valid. Find the problem, and fix it....
Read more >
<table>: The Table element - HTML - MDN Web Docs - Mozilla
This enumerated attribute defines where rules, i.e. lines, should appear in a table. It can have the following values: none , which indicates ......
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