Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
Download the chromedriver version based on the chrome version (#9)
Browse files Browse the repository at this point in the history
* Download the chromedriver version based on the chrome version

* fix webdriver
  • Loading branch information
jakemac53 authored and grouma committed Aug 6, 2019
1 parent 90bae56 commit 20567a4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ before_install:
- sh -e /etc/init.d/xvfb start

before_script:
- wget http://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip
- "export CHROME_LATEST_VERSION=$(/usr/bin/google-chrome --version | cut -d' ' -f3 | cut -d'.' -f1)"
- "export CHROME_DRIVER_VERSION=$(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_LATEST_VERSION)"
- "wget https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip"
- unzip chromedriver_linux64.zip
- export PATH=$PATH:$PWD
- ./tool/travis-setup.sh
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ dependencies:
dev_dependencies:
shelf_static: ^0.2.8
test: ^1.5.3
webdriver: ^2.0.0
webdriver: ^2.1.0
12 changes: 7 additions & 5 deletions test/sse_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ void main() {
listDirectories: true, defaultDocument: 'index.html'));

server = await io.serve(cascade.handler, 'localhost', 0);
webdriver = await createDriver(desired: {
'chromeOptions': {
'args': ['--headless']
}
});
var capabilities = Capabilities.chrome
..addAll({
Capabilities.chromeOptions: {
'args': ['--headless']
}
});
webdriver = await createDriver(desired: capabilities);
});

tearDown(() async {
Expand Down

0 comments on commit 20567a4

Please sign in to comment.