File tree 1 file changed +7
-0
lines changed
javascript/firefox-driver/js
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 19
19
20
20
goog . require ( 'WebDriverServer' ) ;
21
21
goog . require ( 'WebElement' ) ;
22
+ goog . require ( 'fxdriver.logging' ) ;
23
+ goog . require ( 'goog.log' ) ;
22
24
23
25
// constants
24
26
/** @const */ var nsISupports = Components . interfaces . nsISupports ;
25
27
/** @const */ var CLASS_ID = Components . ID ( "{1C0E8D86-B661-40d0-AE3D-CA012FADF170}" ) ;
26
28
/** @const */ var CLASS_NAME = "firefoxWebDriver" ;
27
29
/** @const */ var CONTRACT_ID = "@googlecode.com/webdriver/fxdriver;1" ;
30
+ /** @const */ var LOG_ = fxdriver . logging . getLogger ( 'fxdriver.ServerFactory' ) ;
28
31
29
32
// This code has been derived from the example code at
30
33
// http://developer-stage.mozilla.org/en/docs/How_to_Build_an_XPCOM_Component_in_Javascript
31
34
// Its copyrights belong to the original author
32
35
33
36
var ServerFactory = {
34
37
createInstance : function ( aOuter , aIID ) {
38
+ Components . utils . import ( "resource://gre/modules/AddonManager.jsm" ) ;
39
+ AddonManager . getAddonByID ( "[email protected] " , function ( addon ) {
40
+ goog . log . info ( LOG_ , "Driven by WebDriver version " + addon . version ) ;
41
+ } ) ;
35
42
if ( aOuter != null )
36
43
throw Components . results . NS_ERROR_NO_AGGREGATION ;
37
44
if ( ! this . server )
You can’t perform that action at this time.
0 commit comments