fix(benchpress): explicitly require navigation to finish before continuing

This commit is contained in:
Julie Ralph 2015-04-16 09:43:22 -07:00
parent 923d90bce8
commit 8b28e99373
1 changed files with 10 additions and 9 deletions

View File

@ -32,15 +32,16 @@ function runBenchmark(config) {
});
}
var url = encodeURI(config.url + '?' + urlParams.join('&'));
browser.get(url);
return benchpressRunner.sample({
id: config.id,
execute: config.work,
prepare: config.prepare,
microMetrics: config.microMetrics,
bindings: [
benchpress.bind(benchpress.Options.SAMPLE_DESCRIPTION).toValue(description)
]
return browser.get(url).then(function() {
benchpressRunner.sample({
id: config.id,
execute: config.work,
prepare: config.prepare,
microMetrics: config.microMetrics,
bindings: [
benchpress.bind(benchpress.Options.SAMPLE_DESCRIPTION).toValue(description)
]
});
});
});
}