Is it possible to use selenium to test whether a jQuery data() is set on an element?
In my app, the user enters information about several orders. Each order gets appended to an overview table so they can see their progress as they're going. In addition to the visible order information, we store some additional information that we need about each order using an array stored in jquery.data(), like this:
$('#table').data('orders').push(neworderdata)
I'd like to write a selenium test to assert that when the user presses 'Add order', my additional data gets added to $('#table').data('orders').
I think I need something like:
Command: assertEval
Target: $('#table').data('order')[1].cust_no
Value: 99999
But I think the issue I'm having is that Selenium IDE doesn't know about the jQuery namespace, and functions, so it doesn't know how to find the table. But even if I used getElementbyID('table'), how do I get selenium to know about the data()?