<commit_before>/*jslint forin:true sub:true anon:true, sloppy:true, stupid:true nomen:true, node:true continue:true*/
/*jslint undef: true*/

/*
* Copyright (c) 2012, Yahoo! Inc.  All rights reserved.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*/

var fs = require("fs");
var util = require("util");
var path = require("path");
var log4js = require("log4js");
var Driver = require("../interface/driver");
var CapabilityManager = require("../util/capabilitymanager");

/**
 * Driver wrapping web driver
 */
function SeleniumDriver(config, args) {
    Driver.call(this, config, args);

    this.logger = log4js.getLogger("SeleniumDriver");
}

util.inherits(SeleniumDriver, Driver);

SeleniumDriver.maxAttempt = 60; // will amount to 30 secs
SeleniumDriver.attemptInterval = 500; // millisec
SeleniumDriver.wdAppPath = "../util/webdriver";

/**
 * Calculate capabilities for the test session
 *
 * @private

 * @return capablities required for the test session or false on error
 */
SeleniumDriver.prototype.getCapabilities = function () {

    var self = this,
        caps = {
            "platform" : "ANY",
            "javascriptEnabled" : true,
            "seleniumProtocol" : "WebDriver"
        },
        tmpCaps,
        browserInfo,
        versionKey,
        cm;

    if (self.config.proxyUrl) {

      console.log(self.config.proxyUrl +":"+ self.config.useProxyForAll);
        if(self.config.useProxyForAll) {
            if ( self.args.proxy || self.args.proxy === undefined  ) {
                self.logger.debug("Adding Proxy Setting to the Browser");
                caps.proxy = {"httpProxy" : self.config.proxyUrl, "proxyType" : "manual"};
            } else {
                self.logger.debug("Descriptor overridden commandline proxy param. Not setting proxy in browser");
            }
        } else {
            if ( self.args.proxy) {
                self.logger.debug("Adding Proxy Setting to the Browser");
                caps.proxy = {"httpProxy" : self.config.proxyUrl, "proxyType" : "manual"};<commit_msg>commenting console.log<commit_after>/*jslint forin:true sub:true anon:true, sloppy:true, stupid:true nomen:true, node:true continue:true*/
/*jslint undef: true*/

/*
* Copyright (c) 2012, Yahoo! Inc.  All rights reserved.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*/

var fs = require("fs");
var util = require("util");
var path = require("path");
var log4js = require("log4js");
var Driver = require("../interface/driver");
var CapabilityManager = require("../util/capabilitymanager");

/**
 * Driver wrapping web driver
 */
function SeleniumDriver(config, args) {
    Driver.call(this, config, args);

    this.logger = log4js.getLogger("SeleniumDriver");
}

util.inherits(SeleniumDriver, Driver);

SeleniumDriver.maxAttempt = 60; // will amount to 30 secs
SeleniumDriver.attemptInterval = 500; // millisec
SeleniumDriver.wdAppPath = "../util/webdriver";

/**
 * Calculate capabilities for the test session
 *
 * @private

 * @return capablities required for the test session or false on error
 */
SeleniumDriver.prototype.getCapabilities = function () {

    var self = this,
        caps = {
            "platform" : "ANY",
            "javascriptEnabled" : true,
            "seleniumProtocol" : "WebDriver"
        },
        tmpCaps,
        browserInfo,
        versionKey,
        cm;

    if (self.config.proxyUrl) {

      //console.log(self.config.proxyUrl +":"+ self.config.useProxyForAll);
        if(self.config.useProxyForAll) {
            if ( self.args.proxy || self.args.proxy === undefined  ) {
                self.logger.debug("Adding Proxy Setting to the Browser");
                caps.proxy = {"httpProxy" : self.config.proxyUrl, "proxyType" : "manual"};
            } else {
                self.logger.debug("Descriptor overridden commandline proxy param. Not setting proxy in browser");
            }
        } else {
            if ( self.args.proxy) {
                self.logger.debug("Adding Proxy Setting to the Browser");
                caps.proxy = {"httpProxy" : self.config.proxyUrl, "proxyType" : "manual"};
{'fraction_non_alphanumeric': 0.13051777618706753, 'fraction_numerical': 0.006680983058935815, 'mean_word_length': 2.7799819657348963, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '79114', 'n_tokens_mistral': 1268, 'n_tokens_neox': 1189, 'n_words': 314}