作者:Kira玄玄 | 来源:互联网 | 2023-10-11 12:59
我希望对自动化测试有更直观的主张。我有一个断言来验证是否显示错误消息,这让您有点头疼。
Assert.assertNotSame((ExpectedConditions.textToBePresentInElementLocated(By.classname("notification-title"),"Error message")),"Error message");
关于如何进行转换的任何建议?
它最终变得比我想像的简单:
msg.author.send('Do you want red wine or white wine?');
msg.author.send(WineText)
.then((systemMsg) => {
systemMsg.channel.awaitMessages(respOnse=> response.content,{
max: 1,time: 5000,errors: ['time'],}).then((collected) => {
systemMsg.channel.send(`You want ${collected.first().content}. Do you prefer a verdejo or a rueda?`);
collected.channel.awaitMessages(respOnse=> response.content,{
max: 1,time: 10000
});
})then((collected2) => {
systemMsg.channel.send(`A ${collected2.first().content} it's. Do you want it at room temperature or chill? `);
}).catch((err) => {
return;
});
notSame and False使我感到困惑:D