Bug 25811: Debug - Paste the source of the page
I am really struggling finding the problem here. Posting the source of the page may help. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
bc1b76be4a
commit
00a3aa21e8
|
|
@ -19,6 +19,7 @@ package t::lib::Selenium;
|
|||
use Modern::Perl;
|
||||
use Carp qw( croak );
|
||||
use JSON qw( from_json );
|
||||
use File::Slurp qw( write_file );
|
||||
|
||||
use C4::Context;
|
||||
|
||||
|
|
@ -28,6 +29,11 @@ __PACKAGE__->mk_accessors(qw(login password base_url opac_base_url selenium_addr
|
|||
sub capture {
|
||||
my ( $class, $driver ) = @_;
|
||||
|
||||
$driver->get_page_source;
|
||||
write_file('/tmp/page_source_from_selenium', $driver->get_page_source);
|
||||
my $gdf3_url = qx(cat /tmp/page_source_from_selenium | curl --data-binary \@- https://gdf3.com);
|
||||
print STDERR "\nPage source pasted at $gdf3_url";
|
||||
|
||||
my $lutim_server = q|https://pic.infini.fr/|; # Thanks Infini!
|
||||
$driver->capture_screenshot('selenium_failure.png');
|
||||
my $from_json = from_json qx{curl -s -F "format=json" -F "file=\@selenium_failure.png" -F "delete-day=1" $lutim_server};
|
||||
|
|
|
|||
Loading…
Reference in New Issue