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

前端 未结 2 1268
南笙
南笙 2021-02-13 07:23

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条回答
  •  眼角桃花
    2021-02-13 08:08

    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"));
      }
    

提交回复
热议问题