Bugzilla – Attachment 70159 Details for
Bug 19802
Move Selenium code to its own module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19802: [DO NOT PUSH] Generate screentshots
Bug-19802-DO-NOT-PUSH-Generate-screentshots.patch (text/plain), 1.14 KB, created by
Jonathan Druart
on 2017-12-26 17:43:40 UTC
(
hide
)
Description:
Bug 19802: [DO NOT PUSH] Generate screentshots
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-12-26 17:43:40 UTC
Size:
1.14 KB
patch
obsolete
>From 29c57161dfaf193547be4e7de0c2eeb0bb040c01 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 26 Dec 2017 14:42:32 -0300 >Subject: [PATCH] Bug 19802: [DO NOT PUSH] Generate screentshots > >This needs to be improved, but let as it for now. >--- > t/lib/Selenium.pm | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/t/lib/Selenium.pm b/t/lib/Selenium.pm >index f33e26981c..f20cbde23b 100644 >--- a/t/lib/Selenium.pm >+++ b/t/lib/Selenium.pm >@@ -92,9 +92,14 @@ sub submit_form { > $self->click_when_visible( $default_submit_selector ); > } > >+our $I = 0; > sub click { > my ( $self, $params ) = @_; > my $xpath_selector; >+ >+ my $filename = "${I}_before.png"; >+ $self->driver->capture_screenshot($filename); >+ > if ( exists $params->{main} ) { > $xpath_selector = '//div[@id="'.$params->{main}.'"]'; > } >@@ -105,6 +110,9 @@ sub click { > $xpath_selector .= '//*[@id="'.$params->{id}.'"]'; > } > $self->click_when_visible( $xpath_selector ); >+ $filename = "${I}_after.png"; >+ $self->driver->capture_screenshot($filename); >+ $I++; > } > > sub click_when_visible { >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19802
:
69756
|
70158
|
70159
|
70733
|
70734