如何运行Watin时隐藏Internet Explorer? [英] How to Hide Internet Explorer when Watin is run ?

查看:99
本文介绍了如何运行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 !

推荐答案

这篇关于如何运行Watin时隐藏Internet Explorer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆