假设我正在开发一个聊天应用程序,用户(X)可以登录该应用程序并向另一个用户(Y)发送消息。
现在,我尝试自动化测试以发送和接收消息,具体步骤如下:
1. X Logs in with his username/password.
2. Selects Y from a list and sends a "Test Message" to Y.
3. X signs out.
4. Y logs in with his username/password.
5. Checks if he has received the message from X.
6. Y replies to X with "Reply to Test Message".
7. Y signs out.
8. X logs in, and checks if he got the reply.
如果我要手动完成这个任务,我会打开两个窗口(其中一个使用无痕模式),在一个窗口中登录X,另一个窗口中登录Y并验证结果。
所以,有几个问题: 1. Protractor是否允许以编程方式生成一个新窗口而无需任何点击?只是一个生成新窗口的函数? 2. 是否可以使这些窗口不共享用户会话(类似于无痕模式)?