Bug 25829

Summary: Z39.50 search selenium test
Product: Koha Reporter: Victor Grousset/tuxayo <victor>
Component: Test SuiteAssignee: Victor Grousset/tuxayo <victor>
Status: ASSIGNED --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: mtj
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18974
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 19384    

Description Victor Grousset/tuxayo 2020-06-20 04:26:52 UTC
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]);