gpt4 book ai didi

c# - 如何在后台启动 PhantomJS + Selenium 窗口?

转载 作者:太空狗 更新时间:2023-10-30 00:51:36 28 4
gpt4 key购买 nike

我在我的应用程序中使用 selenium + phantomjs,但我想在后台启动我的应用程序、selenium 和 phantomjs 窗口。我该怎么做?

我试过:

PhantomJSOptions options = new PhantomJSOptions();
options.AddAdditionalCapability("start-maximized", false);
IWebDriver driver = new PhantomJSDriver(Environment.CurrentDirectory + @"\drivers", options);

最佳答案

var serviceJs = PhantomJSDriverService.CreateDefaultService(phantomPath);
serviceJs.HideCommandPromptWindow = true;

Instance = new PhantomJSDriver(serviceJs);

关于c# - 如何在后台启动 PhantomJS + Selenium 窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26133336/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com