问题描述
我已经使用 Selenium webdriver 在 C# 中编写了几行代码.随着我的应用程序转移到 Electron 框架,一切都发生了变化,老实说,我现在不知道如何应对.
I've already written few lines of code in C# using Selenium webdriver. As my application was transferred to the Electron framework everything has changed and honestly, I don't know how to cope with it right now.
你能帮我澄清一下吗?我应该采取什么步骤来简单开始...我想继续我在当前项目中的工作(硒,C#),但我不确定这是否可能,或者我应该完全从头开始使用不同的语言和框架?
Could you please clarify it to me? What steps should I take to simple start... I would like to continue my work in the current project (selenium, C#), but I'm not sure that it's possible, or I should completely start from scratch using a different language and framework?
我已经阅读了有关 Spectron 的信息,并检查了诸如 stackoverflow 之类的互联网资源,但是我仍然处于不知情的地步……
I've read about Spectron, and checked the internet resources like stackoverflow, however I'm still in the point of unawareness...
推荐答案
带有 mocha 的 Spectron 应该更快.
Spectron with mocha is supposed to be faster.
但这里仍然是您需要的.这是 Java &硒.
But still here is what you need.This is Java & Selenium.
System.setProperty("webdriver.chrome.driver","C:\electron-chromedriver\bin\chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setBinary("C:\Users\app.exe");
chromeOptions.addArguments("start-maximized");
DesiredCapabilities capability = new DesiredCapabilities();
capability.setCapability(CapabilityType.BROWSER_NAME, "Chrome");
capability.setCapability("chromeOptions", chromeOptions);
driver = new ChromeDriver(chromeOptions);
我已将打包的电子应用程序用于二进制(即) app.exe .
I have used the packaged electron app for binary (i.e) app.exe .
我认为这就是你所需要的.
I think this is what you need.
这篇关于将硒与电子框架联系起来(c#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)