Skip to content

Commit

Permalink
using atoms from appium-atoms npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
sebv committed Feb 17, 2014
1 parent ccfe1b7 commit 0b192ff
Show file tree
Hide file tree
Showing 63 changed files with 9 additions and 19,304 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = function (grunt) {
files: {
src: ['*.js', './**/*.js'],
options: {
ignores: ['./submodules/**/*.js', './node_modules/**/*.js', './lib/devices/ios/webdriver-atoms/*.js', './sample-code/**/*.js', './test/**/*.js', './lib/server/static/**/*.js', './lib/devices/firefoxos/atoms/*.js', './lib/devices/ios/uiauto/**/*.js']
ignores: ['./submodules/**/*.js', './node_modules/**/*.js', './sample-code/**/*.js', './test/**/*.js', './lib/server/static/**/*.js', './lib/devices/firefoxos/atoms/*.js', './lib/devices/ios/uiauto/**/*.js']
}
},
test: {
Expand Down
12 changes: 6 additions & 6 deletions lib/devices/ios/remote-debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var net = require('net')
, appLogger = require('../../server/logger.js').get('appium')
, _ = require('underscore')
, messages = require('./remote-messages.js')
, atoms = require('./webdriver-atoms')
, getAtom = require('appium-atoms').get
, status = require("../../server/status.js")
, bplistCreate = require('bplist-creator')
, bplistParse = require('bplist-parser')
Expand Down Expand Up @@ -190,7 +190,7 @@ RemoteDebugger.prototype.onPageChange = function (pageDict) {
};

RemoteDebugger.prototype.wrapScriptForFrame = function (script, frame) {
var elFromCache = atoms.get('get_element_from_cache')
var elFromCache = getAtom('get_element_from_cache')
, wrapper = "";
this.logger.info("Wrapping script for frame " + frame);
frame = JSON.stringify(frame);
Expand All @@ -201,7 +201,7 @@ RemoteDebugger.prototype.wrapScriptForFrame = function (script, frame) {
};

RemoteDebugger.prototype.wrapElementEqualsElementAtom = function (args) {
var elFromCache = atoms.get('get_element_from_cache');
var elFromCache = getAtom('get_element_from_cache');
var wrapper = "function () {";
wrapper += "var elFromCache = (function (id){ ";
wrapper += "try {";
Expand All @@ -222,7 +222,7 @@ RemoteDebugger.prototype.wrapElementEqualsElementAtom = function (args) {
};

RemoteDebugger.prototype.wrapJsEventAtom = function (args) {
var elFromCache = atoms.get('get_element_from_cache');
var elFromCache = getAtom('get_element_from_cache');
var wrapper = "function () {";
wrapper += "var elFromCache = (function (id){ ";
wrapper += "try {";
Expand Down Expand Up @@ -253,7 +253,7 @@ RemoteDebugger.prototype.executeAtom = function (atom, args, frames, cb) {
} else if (atom === "fireEvent") {
atomSrc = this.wrapJsEventAtom(args);
} else {
atomSrc = atoms.get(atom);
atomSrc = getAtom(atom);
}
args = _.map(args, JSON.stringify);
if (frames.length > 0) {
Expand Down Expand Up @@ -295,7 +295,7 @@ RemoteDebugger.prototype.executeAtomAsync = function (atom, args, frames, respon
asyncCallBack += "function (res) { xmlHttp = new XMLHttpRequest(); xmlHttp.open('POST', '" + responseUrl + "', true);";
asyncCallBack += "xmlHttp.setRequestHeader('Content-type','application/json'); xmlHttp.send(res); }";

atomSrc = atoms.get(atom);
atomSrc = getAtom(atom);
args = _.map(args, JSON.stringify);
if (frames.length > 0) {
script = atomSrc;
Expand Down
20 changes: 0 additions & 20 deletions lib/devices/ios/webdriver-atoms.js

This file was deleted.

48 changes: 0 additions & 48 deletions lib/devices/ios/webdriver-atoms/active_element.js

This file was deleted.

134 changes: 0 additions & 134 deletions lib/devices/ios/webdriver-atoms/clear.js

This file was deleted.

17 changes: 0 additions & 17 deletions lib/devices/ios/webdriver-atoms/clear_local_storage.js

This file was deleted.

Loading

0 comments on commit 0b192ff

Please sign in to comment.