如何运行Watin时隐藏Internet Explorer?

问题描述:

嗨!



我正在使用Watin 2.0.0.1000并且我想隐藏互联网资源管理器



我的代码如下:



Hi !

I'm using Watin 2.0.0.1000 and I want to hide the internet explorer

my code is as following :

using (IE browser = new IE("http://www.wine-searcher.com/wine-valuation-f.lml"))
            {


                browser.ShowWindow(WatiN.Core.NativeMethods.WindowShowStyle.Hide);
                browser.TextField(Find.ById("wn1_input")).TypeText("William Fevre Les Clos, Chablis Grand Cru, France");
                browser.TextField(Find.ById("vt1_input")).TypeText("NV");
                browser.Button(Find.ById("valButton")).Click();
                TextBox1.Text = browser.TextField(Find.ById("value1Input")).Text;

                //Assert.IsTrue(browser.ContainsText("WatiN"));
            }





我用的是browser.ShowWindow(WatiN.Core.NativeMethods.WindowShowStyle.Hide);但是我仍然可以看到IE的闪光



Thnak you!



I used "browser.ShowWindow(WatiN.Core.NativeMethods.WindowShowStyle.Hide);" but I can still see a flash of IE

Thnak you !