我最近开始研究一个我想尝试行为驱动开发的项目。我选择了SpecFlow作为我的测试框架,因为它是一个C#应用程序。根据我在网上关于这个话题的阅读,BDD在TDD上的一个优势是BDD可以用来测试用户界面。但是,我在使用SpecFlow时遇到了一些麻烦。对于我的第一个测试,我想写下列功能:SpecFlow和用户界面测试
用户单击一个按钮,显示一个FolderBrowseDialog,选择一个文件夹后,应用程序搜索该文件夹中与该应用程序相关的文件,并将这些文件加载到应用。
下列情况是或多或少我想写什么:
Scenario: Add Model
Given I am on the main screen
When I click Add Model
And select a folder
And the folder contains a model
Then the model is loaded into the application
什么代码,我需要有SpecFlow点击该FolderBrowseDialog东西来完成这个测试?