Skip to content

Commit

Permalink
Adding WebDriver version fingerprint to the Firefox log
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Oct 29, 2014
1 parent 8aed1e7 commit 4c3c150
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions javascript/firefox-driver/js/driver-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,26 @@

goog.require('WebDriverServer');
goog.require('WebElement');
goog.require('fxdriver.logging');
goog.require('goog.log');

// constants
/** @const */ var nsISupports = Components.interfaces.nsISupports;
/** @const */ var CLASS_ID = Components.ID("{1C0E8D86-B661-40d0-AE3D-CA012FADF170}");
/** @const */ var CLASS_NAME = "firefoxWebDriver";
/** @const */ var CONTRACT_ID = "@googlecode.com/webdriver/fxdriver;1";
/** @const */ var LOG_ = fxdriver.logging.getLogger('fxdriver.ServerFactory');

// This code has been derived from the example code at
// http://developer-stage.mozilla.org/en/docs/How_to_Build_an_XPCOM_Component_in_Javascript
// Its copyrights belong to the original author

var ServerFactory = {
createInstance: function (aOuter, aIID) {
Components.utils.import("resource://gre/modules/AddonManager.jsm");
AddonManager.getAddonByID("[email protected]", function(addon) {
goog.log.info(LOG_, "Driven by WebDriver version " + addon.version);
});
if (aOuter != null)
throw Components.results.NS_ERROR_NO_AGGREGATION;
if (!this.server)
Expand Down

0 comments on commit 4c3c150

Please sign in to comment.