Skip to content
Open
Changes from 1 commit
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
15 changes: 4 additions & 11 deletions runtime/chromeDriver.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
'use strict';

var chromedriver = require('chromedriver');
var selenium = require('selenium-webdriver');

/**
* Creates a Selenium WebDriver using Chrome as the browser
* @returns {ThenableWebDriver} selenium web driver
*/
module.exports = function() {
module.exports = function () {

var driver = new selenium.Builder().withCapabilities({
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true,
chromeOptions: {
args: ['start-maximized']
},
path: chromedriver.path
}).build();
var driver = new selenium.Builder().
usingServer('http://localhost:4444/wd/hub').
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about users who don't want to run it standalone?

withCapabilities(selenium.Capabilities.chrome()).build();

driver.manage().window().maximize();

Expand Down