【发布时间】:2012-09-05 14:14:00
【问题描述】:
我正在尝试以编程方式单击“保存”按钮并测试 Windows 保存对话框是否出现:除了我相信的断言语句之外,我拥有一切。我不知道如何断言我的自定义 SaveDialogBox 出现在用户面前。
[test]
public void Method_WhenThePersonIsNotfound_ClickingTheButtonSavesLetterToWordDocument
{
//arrange
CreateNewPage(); //creates IE window enters fields and clicks submit on first page.
//act
this.InternetExplorerDriver.FindElementById("SaveForm").Click(); //Clicks my button that should produce a save dialog box.
//assert
//Assert statement to verify that when button was clicked the save dialog box to save the letter in word appears.
【问题讨论】:
-
那么这是一个网络集成测试吗?您所说的与 NUnit 关系不大,而与您使用的框架有很大关系:Selenium、WatIN 等。
-
好的,我可以改写这个问题,抱歉