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

Download the chromedriver version based on the chrome version #9

Merged
merged 2 commits into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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