Here is some code to reuse from bug 18974 because Z39.50 won't be used: # Go to Cataloging page $s->click( { href => '/cataloguing/addbooks.pl', main => 'container-main' } ); $s->click( { id => 'z3950search' } ); # Z39.50 search pop up my $handles = $driver->get_window_handles; $driver->switch_to_window($handles->[1]); $s->fill_form( { title => "The Iliad", author => "Homer" } ); $s->submit_form; # Import the MARC result # open the "Actions" dropdown of the first result $driver->find_element_by_css("tr:nth-of-type(1) [id*=cataloguesearchactions]")->click; # "Import" the first result $driver->find_element_by_css("tr:nth-of-type(1) .import_record")->click; $driver->switch_to_window($handles->[0]);