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

前端 未结 2 2165
渐次进展
渐次进展 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条回答
  • 2021-02-13 07:56
     BrowserWindow uatwebjetcomauBrowser = BrowserWindow.Launch(new System.Uri(this.LaunchBrowserParams.Url));
    
    0 讨论(0)
  • 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"));
      }
    
    0 讨论(0)
提交回复
热议问题