File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 60
60
rescue Selenium ::WebDriver ::Error ::TimeOutError
61
61
print "\r Timeout, have fun."
62
62
ensure
63
- browser . save_screenshot ( 'screenshot.png' )
64
- response = RestClient . post ( 'https://api.imgur.com/3/upload' ,
65
- { image : File . open ( 'screenshot.png' ) } ,
66
- { 'Authorization' => 'Client-ID 1979876fe2a097e' } )
67
-
68
- print " ("
69
- print JSON . parse ( response . to_str ) [ 'data' ] [ 'link' ]
70
- print ")"
63
+ begin
64
+ browser . save_screenshot ( 'screenshot.png' )
65
+ response = RestClient . post ( 'https://api.imgur.com/3/upload' ,
66
+ { image : File . open ( 'screenshot.png' ) } ,
67
+ { 'Authorization' => 'Client-ID 1979876fe2a097e' } )
68
+
69
+ print " ("
70
+ print JSON . parse ( response . to_str ) [ 'data' ] [ 'link' ]
71
+ puts ")"
72
+ rescue Exception
73
+ puts
74
+ end
71
75
72
76
browser . quit
73
77
end
You can’t perform that action at this time.
0 commit comments