1

I keep getting the following error for one of my steps :

'Tables were not identical (Cucumber::Ast::Table::Different)'  

But the difference shown in the console has nothing different about it.

Here is the console output for the error. The rows where it tries to show the difference have been marked with ' * '

 | Date   | Column1  | Column2 | 
 | Jun 08 | Value1   |         |  
 | Jun 06 | Value2   | 2       | 
*| Jun 08 | Value1   |         |  
 | Jun 05 | Value3   |         |  
*| Jun 06 | Value2   | 2       | 
*| Jun 05 | Value3   |         |  

I would expect to see just the following table pass in green, since there's no difference in the rows being shown with an ' * ' (rows with difference) :

 | Date   | Column1  | Column2 | 
 | Jun 08 | Value1   |         |  
 | Jun 06 | Value2   | 2       | 
 | Jun 05 | Value3   |         |  

Any ideas why this is happening ?

Thanks in advance.

1 Answer 1

1

So I fixed this issue by adding the following to my scenario, which opened up the html page in the browser. :

And show me the page

Then I inspected the rows marked above with ' * ' using Firebug.

I found white spaces in the rows, which was causing the apparently same rows to be different for cucumber.

Removed the whitespaces in my code and that fixed it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.