{"size": 1148, "ext": "js", "max_stars_repo_path": "tests/lib/browser-driver.js", "max_stars_repo_name": "staltz/beaker", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "tests/lib/browser-driver.js", "max_issues_repo_name": "staltz/beaker", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tests/lib/browser-driver.js", "max_forks_repo_name": "staltz/beaker", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 42.5185185185, "max_line_length": 99, "alphanum_fraction": 0.6245644599}
exports.navigateTo = function (app, url) {
  return app.client.windowByIndex(0)
    .then(() => app.client.waitForExist('.toolbar-actions:not(.hidden) .nav-location-input', 10e3))
    .then(() => app.client.pause(500)) // need to wait a sec for the UI to catch up
    .then(() => {
      return app.client.click('.toolbar-actions:not(.hidden) .nav-location-pretty')
      .catch(() => app.client.click('.toolbar-actions:not(.hidden) .nav-location-input'))
    })
    .then(() => app.client.pause(500)) // need to wait a sec for the UI to catch up
    .then(() => app.client.keys('\uE003')) // backspace
    .then(() => app.client.setValue('.toolbar-actions:not(.hidden) .nav-location-input', url))
    .then(() => app.client.pause(500)) // need to wait a sec for the UI to catch up
    .then(() => app.client.keys('\uE007')) // enter
}

exports.newTab = function (app) {
  var index
  return app.client.windowByIndex(0)
    .then(() => app.client.getWindowCount())
    .then(count => {
      index = count
      return app.client.click('.chrome-tab-add-btn')
    })
    .then(() => app.client.waitUntilWindowLoaded(index))
    .then(() => index)
}
