Hiding Internet Explorer when WatiN is run

后端 未结 3 2161
孤独总比滥情好
孤独总比滥情好 2020-12-09 05:27

I would like to know how I can prevent Internet Explorer from firing up every time I run my console application which uses WatiN for testing live sites.

When I run m

3条回答
  •  北海茫月
    2020-12-09 05:36

    Try:

    using (IE ie = new IE("http://somesite.com/"))
    {
      ie.ShowWindow(NativeMethods.WindowShowStyle.Hide);
      ....
    }
    

提交回复
热议问题