Linking selenium with electron framework (c#)(将硒与电子框架联系起来(c#))
问题描述
我已经使用 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#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将硒与电子框架联系起来(c#)
基础教程推荐
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- WPF 模态进度窗口 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
