+
+# Save the staged records URI for later use
+my $staged_records_uri = $agent->uri;
+
+my $import_batch_id = ( split( '=', $staged_records_uri->as_string ) )[-1];
+# Get datatable for the batch id
+$agent->get_ok(
+ "$intranet/cgi-bin/koha/tools/batch_records_ajax.pl?import_batch_id=$import_batch_id",
+ 'get the datatable for the new batch id'
+);
+$jsonresponse = decode_json $agent->content;
+like( $jsonresponse->{ aaData }[0]->{ citation }, qr/$bookdescription/, 'found book' );
+my $biblionumber = $jsonresponse->{ aaData }[0]->{ import_record_id };
+# Back to the manage staged records page
+$agent->get($staged_records_uri);
+$agent->form_number(6);