--- a/t/db_dependent/selenium/regressions.t
+++ a/t/db_dependent/selenium/regressions.t
@@ -59,10 +59,12 @@ subtest 'OPAC - borrowernumber and branchcode as html attributes' => sub {
$patron->set_password({ password => $password });
$s->opac_auth( $patron->userid, $password );
my $elt = $driver->find_element('//span[@class="loggedinusername"]');
- is( $elt->get_attribute('data-branchcode'), $patron->library->branchcode,
+ is( $elt->get_attribute('data-branchcode', 1), $patron->library->branchcode,
"Since bug 20921 span.loggedinusername should contain data-branchcode"
+ # No idea why we need the second param of get_attribute(). As
+ # data-branchcode is still there after page finished loading.
);
- is( $elt->get_attribute('data-borrowernumber'), $patron->borrowernumber,
+ is( $elt->get_attribute('data-borrowernumber', 1), $patron->borrowernumber,
"Since bug 20921 span.loggedinusername should contain data-borrowernumber"
);
push @cleanup, $patron, $patron->category, $patron->library;
@@ -168,11 +170,11 @@ subtest 'Display circulation table correctly' => sub {
my @thead_th = $driver->find_elements('//table[@id="issues-table"]/thead/tr/th');
my $thead_length = 0;
- $thead_length += $_->get_attribute('colspan') || 0 for @thead_th;
+ $thead_length += $_->get_attribute('colspan', 1) || 0 for @thead_th;
my @tfoot_td = $driver->find_elements('//table[@id="issues-table"]/tfoot/tr/td');
my $tfoot_length = 0;
- $tfoot_length += $_->get_attribute('colspan') || 0 for @tfoot_td;
+ $tfoot_length += $_->get_attribute('colspan', 1) || 0 for @tfoot_td;
my @tbody_td = $driver->find_elements('//table[@id="issues-table"]/tbody/tr[2]/td');
my $tbody_length = 0;
--- a/t/db_dependent/selenium/update_child_to_adult.t
+++ a/t/db_dependent/selenium/update_child_to_adult.t
@@ -117,6 +117,7 @@ subtest 'Update child to patron' => sub {
# Note that if there is only 1 adult in the DB the popup does not appears, but an alert instead. Not tested so far.
my $handles = $driver->get_window_handles;
$driver->switch_to_window($handles->[1]);
+ $s->wait_for_element_visible('//table[@id="catst"]'); # category table
$driver->find_element('//input[@id="catcode'.$patron_category_A->categorycode.'"]')->click;
$s->submit_form;
@@ -134,7 +135,7 @@ subtest 'Update child to patron' => sub {
$driver->find_element('//div[@id="toolbar"]/div[@class="btn-group"][last()]')->click; # More button group
my $update_link = $driver->find_element('//a[@id="updatechild"]');
- is($update_link->get_attribute('data-toggle'), 'tooltip', q|The update link should have a data-toggle attribute => it's a tooltip, not clickable|);
+ is($update_link->get_attribute('data-toggle', 1), 'tooltip', q|The update link should have a data-toggle attribute => it's a tooltip, not clickable|);
$update_link->click;
like( $driver->get_current_url, qr{/members/moremember\.pl\?borrowernumber=$adult_borrowernumber$}, 'After clicking the link, nothing happens, no # in the URL');
};
--- a/t/lib/Selenium.pm
+++ a/t/lib/Selenium.pm
@@ -103,8 +103,8 @@ sub auth {
$self->driver->get($mainpage);
$self->fill_form( { userid => $login, password => $password } );
- my $login_button = $self->driver->find_element('//input[@id="submit"]');
- $login_button->submit();
+ my $login_button = $self->driver->find_element('//input[@id="submit-button"]');
+ $login_button->click();
}
sub opac_auth {
--