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

前端 未结 2 1232
南笙
南笙 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"));
      }
    
    0 讨论(0)
  • 2021-02-13 08:13
     BrowserWindow uatwebjetcomauBrowser = BrowserWindow.Launch(new System.Uri(this.LaunchBrowserParams.Url));
    
    0 讨论(0)
提交回复
热议问题