Javascript CasperJs电子邮件在textbox上无效

Javascript CasperJs电子邮件在textbox上无效,javascript,azure,phantomjs,casperjs,Javascript,Azure,Phantomjs,Casperjs,我正在使用phantomjs和casperjs登录azure。我面临的一个问题是,它在登录页面上输入我的电子邮件,并抱怨电子邮件无效 有人知道为什么吗 问题是应用程序无法识别您的输入更改。使用内置函数将值发送到输入。既然您的问题中有casperjs标记,我将为您提供casperjs解决方案 var casper = require('casper').create({ viewportSize: { width: 1200, height: 800 }, });

我正在使用phantomjs和casperjs登录azure。我面临的一个问题是,它在登录页面上输入我的电子邮件,并抱怨电子邮件无效

有人知道为什么吗


问题是应用程序无法识别您的输入更改。使用内置函数将值发送到输入。既然您的问题中有casperjs标记,我将为您提供casperjs解决方案

var casper = require('casper').create({
  viewportSize: {
      width: 1200,
      height: 800
  },
});
casper
.start()
.thenOpen("https://login.microsoftonline.com", function () {
  this.echo('Opened it');
})
.then(function() {
  this.sendKeys('input[type=email]', 'youremail');
})
.thenClick('input[type=submit]')
.wait(5000)
.then(function() {
  this.capture('test.png');
})
.run();
这将把你带到下一个屏幕(密码屏幕),这样你就可以在那里施展你的魔法

var casper = require('casper').create({
  viewportSize: {
      width: 1200,
      height: 800
  },
});
casper
.start()
.thenOpen("https://login.microsoftonline.com", function () {
  this.echo('Opened it');
})
.then(function() {
  this.sendKeys('input[type=email]', 'youremail');
})
.thenClick('input[type=submit]')
.wait(5000)
.then(function() {
  this.capture('test.png');
})
.run();