I have this jquery that is working on the firebug console:
$('#transaction_list>tbody>tr>td:nth-child(2)').each( function(){$(this).toArray();})
And I need to get the returned values on an array.
this is the line on the code:
String [] aux = (String[]) js.executeScript("return $('#transaction_list>tbody>tr>td:nth-child(2)').each( function(){$(this).toArray();})");
System.out.println(aux);
Returning Javascript arrays is not the problem here. But your jQuery code does not return what you want.
Assuming you want to get an array of all the texts contained in the second column of the table
#transaction_list, you might want to use: