disable IE visibility while using WatiN

前端 未结 2 1803
北荒
北荒 2020-12-22 00:40

I use watin, because I need to open some websites in the background for which the user needs to support Javascript. I don\'t know if WatiN is the best for this job, but at t

2条回答
  •  感情败类
    2020-12-22 01:24

    The WatIn.Core.IE class has a Visible property, you can initialize the object like that:
    new WatiN.Core.IE() { Visible = true }

    This way the IE will just blink on the screen when it's created, and then it will get hidden. You can later control the visibility of the IE with the ShowWindow method of WatiN.Core.IE class - I mean you can show it on the screen if you need, or you can hide again.

提交回复
热议问题