Bug 25811: (follow-up) Debug - Paste the source of the page
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 31 Jul 2020 10:55:40 +0000 (12:55 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 31 Jul 2020 10:56:47 +0000 (12:56 +0200)
Wide character in syswrite at /usr/share/perl5/File/Slurp.pm line 506.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

t/lib/Selenium.pm

index 8e74976..4644d11 100644 (file)
@@ -30,7 +30,7 @@ sub capture {
     my ( $class, $driver ) = @_;
 
     $driver->get_page_source;
-    write_file('/tmp/page_source_from_selenium', $driver->get_page_source);
+    write_file('/tmp/page_source_from_selenium', {binmode => ':utf8'}, $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";