将硒与电子框架联系起来(c#)

Linking selenium with electron framework (c#)(将硒与电子框架联系起来(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#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Custom Error Queue Name when using EasyNetQ for RabbitMQ?(使用 EasyNetQ for RabbitMQ 时自定义错误队列名称?)
How to generate password_hash for RabbitMQ Management HTTP API(如何为 RabbitMQ 管理 HTTP API 生成密码哈希)
Rabbitmq Ack or Nack, leaving messages on the queue(Rabbitmq Ack 或 Nack,将消息留在队列中)
Setup RabbitMQ consumer in ASP.NET Core application(在 ASP.NET Core 应用程序中设置 RabbitMQ 消费者)
Specify Publish timeouts in mass transit(指定公共交通中的发布超时)
RabbitMQ asynchronous support(RabbitMQ 异步支持)