Permalink
Browse files

can log in with team

  • Loading branch information...
pj4533 committed Jan 23, 2013
1 parent 3553e84 commit fb5fd4072c5c8b5366dde47556b10a116b09c8e4
Showing with 22 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +21 −3 lightman.js
View
@@ -1,3 +1,4 @@
+.DS_Store
node_modules
lib-cov
*.seed
View
@@ -4,6 +4,7 @@ var program = require('commander');
program.version('0.0.1')
.option('-p, --password [password]', 'Use password [blah]', 'blah')
.option('-u, --username [username]', 'Use username [blah]', 'blah')
+ .option('-t, --team [team]', 'Use team [blah]', 'blah')
.parse(process.argv);
var spooky = new Spooky({
@@ -19,7 +20,7 @@ var spooky = new Spooky({
e.details = err;
throw e;
}
-
+
spooky.on('error', function(e) {
console.error(e);
});
@@ -34,23 +35,40 @@ var spooky = new Spooky({
}
});
+ // first go to dev center page
spooky.start('https://developer.apple.com/devcenter/ios/index.action');
+
+ // then click the blue button, i don't go directly here cause it has some appid thing
spooky.then(function() {
this.click('[class="button blue"]');
});
- // couldnt figure out how to pass variables to the fill function
+ // couldnt figure out how to pass variables to the fill function so I do querySelector
spooky.thenEvaluate(function(obj) {
document.querySelector('[name="theAccountName"]').value = obj.username;
document.querySelector('[name="theAccountPW"]').value = obj.password;
},{ username:program.username, password:program.password});
+ // press signin button
spooky.then(function() {
this.click('[class="button large blue signin-button"]');
});
+ spooky.thenEvaluate(function(teamId) {
+ document.querySelector('[name="memberDisplayId"]').value=teamId;
+ },program.team);
+
+ // press continue button
+ spooky.then(function() {
+ this.click('[name="action:saveTeamSelection!save"]');
+ });
+
+ spooky.then(function() {
+ this.clickLabel('iOS Provisioning Portal','a');
+ });
+
spooky.then(function() {
- this.capture('DERP.png');
+ this.capture('lightman.png');
});
spooky.run();

0 comments on commit fb5fd40

Please sign in to comment.