{"action":"opened","issue":{"url":"https://api.github.com/repos/xolvio/chimp/issues/261","repository_url":"https://api.github.com/repos/xolvio/chimp","labels_url":"https://api.github.com/repos/xolvio/chimp/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/xolvio/chimp/issues/261/comments","events_url":"https://api.github.com/repos/xolvio/chimp/issues/261/events","html_url":"https://github.com/xolvio/chimp/issues/261","id":132101872,"number":261,"title":"Order of arguments in exectuteAsync differs from WebdriverIO documentation","user":{"login":"yogiben","id":1703155,"avatar_url":"https://avatars.githubusercontent.com/u/1703155?v=3","gravatar_id":"","url":"https://api.github.com/users/yogiben","html_url":"https://github.com/yogiben","followers_url":"https://api.github.com/users/yogiben/followers","following_url":"https://api.github.com/users/yogiben/following{/other_user}","gists_url":"https://api.github.com/users/yogiben/gists{/gist_id}","starred_url":"https://api.github.com/users/yogiben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogiben/subscriptions","organizations_url":"https://api.github.com/users/yogiben/orgs","repos_url":"https://api.github.com/users/yogiben/repos","events_url":"https://api.github.com/users/yogiben/events{/privacy}","received_events_url":"https://api.github.com/users/yogiben/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-08T10:18:15Z","updated_at":"2016-02-08T10:18:15Z","closed_at":null,"body":"From [WebddriverIO documentation](http://webdriver.io/api/protocol/executeAsync.html), `done` is last argument.\r\n\r\n```\r\nclient\r\n    .timeoutsAsyncScript(5000)\r\n    .executeAsync(function(a, b, c, d, done) {\r\n        // browser context - you may access neither client nor console\r\n        setTimeout(function() {\r\n            done(a + b + c + d);\r\n        }, 3000);\r\n    }, 1, 2, 3, 4).then(function(ret) {\r\n        // node.js context - client and console are available\r\n        console.log(ret.value); // outputs: 10\r\n    });\r\n```\r\n\r\nWhat's working for me: `done` as first argument.\r\n\r\n```\r\nloginAsLevel: function (level) {\r\n        client.executeAsync(function (done, level) {\r\n          var email = `level${level}@bitwa.la`\r\n          var password = \"starwars\"\r\n          Meteor.loginWithPassword(email, password, done)\r\n        })\r\n      },\r\n```\r\n\r\nI figured this particular problem out, but wondering how/why this differs."}}