THRIFT-3134 Remove use of deprecated "phantom.args"
diff --git a/lib/js/test/phantomjs-qunit.js b/lib/js/test/phantomjs-qunit.js
index 027be40..b7b8012 100755
--- a/lib/js/test/phantomjs-qunit.js
+++ b/lib/js/test/phantomjs-qunit.js
@@ -8,6 +8,8 @@
  * Inclusion into Apache products is allowed according to http://www.apache.org/legal/3party.html
  */
 
+var system = require('system');
+
 
 /**
  * Wait until the test condition is true or a timeout occurs. Useful for waiting
@@ -49,7 +51,7 @@
 }
 
 
-if (phantom.args.length === 0 || phantom.args.length > 2) {
+if (system.args.length === 1 || system.args.length > 3) {
     console.log('Usage: phantomjs phantomjs-qunit.js URL');
     phantom.exit(1);
 }
@@ -61,7 +63,7 @@
     console.log(msg);
 };
 
-page.open(phantom.args[0], function(status){
+page.open(system.args[1], function(status){
     if (status !== "success") {
         console.log("Unable to access network");
         phantom.exit(1);