CodedUI tests - start a browser once for the entire set of tests

前端 未结 2 2158
渐次进展
渐次进展 2021-02-13 07:20

I\'m writing some codedUI tests in VS2010 to test a web application. I\'d like to be able to open the browser once for the entire set of tests in the solution a

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-13 08:07

    If using ClassInitialize, you need to initialize the playback engine with Playback.Initialize()

      [ClassInitialize]
      public static void LaunchBroswer(TestContext context)
      {         
         Playback.Initialize(); 
         BrowserWindow browser = BrowserWindow.Launch(new System.Uri("about:blank"));
      }
    

提交回复
热议问题