ui自动化采用js与浏览器整合方案

1.代码javascript
function f(messages){
if(messages.length !== 1) {
throw new Error("Failed to find message in inbox " + emailAddress);
}
var emailSubject = messages[0].subject;
alert(emailSubject)
console.log(emailSubject)
if(emailSubject !== "Please activate your account") {
throw new Error("Email subject not match " + emailSubject);
}
var emailText = messages[0].html;
console.log(emailText)
console.log(emailText.match(reg))
var reg = /[0-9]{6}/;
var aa = emailText.match(reg)
console.log(aa)
return aa[0];
}
2.浏览器按F12,查看console


ui自动化采用js与浏览器整合方案_第1张图片
image.png

3.复制出来信息,保存为html文件,可以查看log,既可以看到页面展示


ui自动化采用js与浏览器整合方案_第2张图片
image.png

你可能感兴趣的:(ui自动化采用js与浏览器整合方案)