File tree Expand file tree Collapse file tree 4 files changed +25
-30
lines changed Expand file tree Collapse file tree 4 files changed +25
-30
lines changed Original file line number Diff line number Diff line change 55import 'dart:async' ;
66import 'dart:io' ;
77import 'dart:math' ;
8+ import 'dart:typed_data' ;
89
910import 'package:image/image.dart' ;
1011import 'package:webdriver/async_io.dart' show WebDriver;
@@ -63,13 +64,15 @@ class WebDriverBrowser extends Browser {
6364
6465 @override
6566 Future <Image > captureScreenshot (Rectangle <num > region) async {
66- final Image image = decodePng (await _driver.captureScreenshotAsList ())! ;
67+ // The underlying return type is Uint8Lint – goto definitions to see
68+ // Fixing in https://github.com/google/webdriver.dart/pull/323
69+ final Image image = decodePng (await _driver.captureScreenshotAsList () as Uint8List )! ;
6770 return copyCrop (
6871 image,
69- region.left.round (),
70- region.top.round (),
71- region.width.round (),
72- region.height.round (),
72+ x : region.left.round (),
73+ y : region.top.round (),
74+ width : region.width.round (),
75+ height : region.height.round (),
7376 );
7477 }
7578}
Original file line number Diff line number Diff line change @@ -18,34 +18,34 @@ dependencies:
1818 path : ../../third_party/web_test_fonts
1919
2020dev_dependencies :
21- archive : 3.6.1
21+ archive : 4.0.3
2222 args : any
2323 async : any
2424 convert : any
2525 crypto : any
26- html : 0.15.4
27- http : 1.1 .0
26+ html : 0.15.5
27+ http : 1.3 .0
2828 http_multi_server : any
29- image : 3.0.1
29+ image : 4.5.3
3030 package_config : any
31- path : 1.8.0
31+ path : 1.9.1
3232 pool : any
33- quiver : 3.2.1
33+ quiver : 3.2.2
3434 shelf : any
3535 shelf_packages_handler : any
3636 shelf_static : any
3737 shelf_web_socket : any
3838 stack_trace : any
39- stream_channel : 2.1.1
40- test : 1.25.8
39+ stream_channel : 2.1.4
40+ test : 1.25.15
4141 test_api : any
4242 test_core : any
4343 typed_data : any
44- watcher : 1.1.0
44+ watcher : 1.1.1
4545 web_socket_channel : any
46- webdriver : 3.0.3
46+ webdriver : 3.1.0
4747 webkit_inspection_protocol : any
48- yaml : 3.0.0
48+ yaml : 3.1.3
4949 web_test_utils :
5050 path : ../../web_sdk/web_test_utils
5151 web_engine_tester :
Original file line number Diff line number Diff line change @@ -5,10 +5,9 @@ environment:
55 sdk : ^3.7.0-0
66
77dependencies :
8- js : ^0.7.0
9- stream_channel : 2.1.1
10- test : 1.25.8
11- webkit_inspection_protocol : 1.0.0
12- stack_trace : 1.10.0
8+ stream_channel : 2.1.4
9+ test : 1.25.15
10+ webkit_inspection_protocol : 1.2.1
11+ stack_trace : 1.12.1
1312 ui :
1413 path : ../../lib/web_ui
Original file line number Diff line number Diff line change @@ -5,17 +5,10 @@ environment:
55 sdk : ^3.7.0-0
66
77dependencies :
8- collection : 1.17.0
9- crypto : 3.0.3
10- image : 3.0.1
11- js : ^0.7.0
12- meta : ^1.7.0
13- path : 1.8.0
14- process : 4.2.3
8+ image : 4.5.3
9+ path : 1.9.1
1510 skia_gold_client :
1611 path : ../../testing/skia_gold_client
17- typed_data : 1.3.0
18- yaml : 3.0.0
1912
2013dependency_overrides :
2114 engine_repo_tools :
You can’t perform that action at this time.
0 commit comments