问题描述
具有使用CefSharp(CEF包装器)构建的桌面应用程序。这只是带有嵌入式铬浏览器的WPF应用程序。我正在为此进行自动化测试,由于浏览器与WPF应用程序并行启动,因此驱动程序重用存在问题。
首先在代码中,我以ChromeDriver
作为构造函数参数创建ChromeOptions
-它具有诸如应用程序.exe的路径,远程调试端口定义之类的东西:
System.setProperty("webdriver.chrome.driver",environment.getChromeDriverPath());
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setBinary(environment.getPath().get("Application path"));
chromeOptions.addArguments("remote-debugging-port=" + environment.getDebuggingPort());
ChromeDriver chromeDriver = new ChromeDriver(chromeOptions);
但是,如果我想模拟一些WPF动作,使用Winium驱动程序怎么办?例如,将一些文件上传到我的应用程序。如何重用Selenium驱动程序或仅接收它并传递给Winium?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)