Antonella's avatar

assert error cypress test E2E expected { Object (userInvocationStack, specWindow, ...) }

I have this table with the following structure:

	<tr>
   <th class="px-4 py-6">id</th>
   <th class="px-4 py-6">status</th>
   <th class="px-4 py-6">date</th>
</tr>
<tr id="1">
   <td class="border-0 px-4 py-6"><a href="/1">1</a></td>
   <td class="border-0 px-4 py-6"><a href="/1">A</a></td>
   <td id="status1"class="border-0 px-4 py-6"><a href="/1">2020-09-19 15:42:22</a></td>
</tr>

i am using cypress on laravel 8x and i would like to compare the status field with an assert and do as follows:

  assert.strictEqual(cy.get('td#status1'), 'A', 'ok A')

gives me following error: ok new: expected { Object (userInvocationStack, specWindow, ...) } to equal new

0 likes
0 replies

Please or to participate in this conversation.