View | Details | Raw Unified | Return to bug 28250
Collapse All | Expand All

(-)a/t/lib/Selenium.pm (-11 / +1 lines)
Lines 29-45 __PACKAGE__->mk_accessors(qw(login password base_url opac_base_url selenium_addr Link Here
29
sub capture {
29
sub capture {
30
    my ( $class, $driver ) = @_;
30
    my ( $class, $driver ) = @_;
31
31
32
    $driver->get_page_source;
33
    write_file('/tmp/page_source_from_selenium', {binmode => ':utf8'}, $driver->get_page_source );
34
    my $gdf3_url = qx(cat /tmp/page_source_from_selenium | curl --data-binary \@- https://gdf3.com);
35
    print STDERR "\nPage source pasted at $gdf3_url";
36
37
    my $lutim_server = q|https://pic.infini.fr/|; # Thanks Infini!
38
    $driver->capture_screenshot('selenium_failure.png');
32
    $driver->capture_screenshot('selenium_failure.png');
39
    my $from_json = from_json qx{curl -s -F "format=json" -F "file=\@selenium_failure.png" -F "delete-day=1" $lutim_server};
33
40
    if ( $from_json ) {
41
        print STDERR "\nSCREENSHOT: $lutim_server/" . $from_json->{msg}->{short} . "\n";
42
    }
43
}
34
}
44
35
45
sub new {
36
sub new {
46
- 

Return to bug 28250