使用Visual Studio进行自动测试

时间:2014-12-19 09:02:55

标签: c# visual-studio-2013 recording testcase automated-tests

我正在研究驱动编码UI测试的数据(使用Visual Studio 2013)。此时测试非常简单

  1. 登录网站
  2. 点击2个链接
  3. 从下拉列表中选择一个值,然后退出。
  4. 步骤1,2工作正常,但由于下面的错误,我的所有运行都失败了。

      

    测试方法CodedUITestProject17.CodedUITest1.CodedUITestMethod1 thrrew   例外:   Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException:   播放无法通过给定搜索找到控件   属性。其他详细信息:TechnologyName:'Web'ControlType:   'Custom'ClassName:'Internet Explorer_Server'

    代码:

    // Select '1' in 'Rooms' combo box 
    uIRoomsComboBox.SelectedItem = this.RecordedMethod1Params.UIRoomsComboBoxSelectedItem; 
    
    // Click list item 
    Mouse.Click(uIItemListItem, new Point(12, 7)); 
    
    // Set flag to allow play back to continue if non-essential actions fail. (For example, if a mouse hover action fails.)
    Playback.PlaybackSettings.ContinueOnError = true;
    

    如果有人可以帮助解决问题..?

0 个答案:

没有答案