我正在使用以下代码比较量角器/茉莉花测试用例之一中的2个字符串。getText()的返回值无法与字符串进行比较
emailnotsentmessage.getText().then(function(text) {
expect(text).toBe('has not received notification about recent changes to the meeting.');
});
其中emailnotsentmessage包含以下文本
[ 'has not received notification about recent changes to the meeting.' ]
出于某种原因,该字符串比较失败。这两个字符串包含绝对相同的内容。我检查了好几次。我在这里错过了什么吗? 电子邮件未发送消息是<span>
的内容。
错误跟踪
1) Get to the existing meeting by navigating to the edit meeting page should display the same value which was entered du
ring create meeting when go into edit meeting
Message:
Expected [ 'has not received notification about recent changes to the meeting.' ] to equal 'has not received notific
ation about recent changes to the meeting.'.
Stack:
Error: Failed expectation
** [**]似乎是** span **文本的一部分。您正在尝试比较没有** [**] –
感谢您的回复。我尝试** [] **,但我得到同样的错误。 '失败: 1)通过导航到编辑会议页面进入现有会议应显示输入的相同值du 进入编辑会议时环形创建会议 消息: 预期['尚未收到有关最近会议变更“。 ]''''没有收到关于最近会议变更的通知 '。 ]”。 堆栈: 错误:期望失败' – Malik
您是否按照Felix的建议尝试了**数组**? –