electron

Is it possible to use Selenium WebDriver for automating desktop applications?

天涯浪子 提交于 2019-12-10 15:53:53
问题 I'm preparing to write automated tests for Web/Desktop application that is currently in the initial stage of development. The technologies that will be used are Laravel, VueJS and most important Electron Framework. Electron is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. So I'm curious about if is it possible to use Selenium WebDriver for automating desktop applications, which are created with web technologies (e.g. Electron)? I have

Properly using Electron

丶灬走出姿态 提交于 2019-12-10 15:08:24
问题 I want to get into Electron, and I have already started learning about it, however I don't think I quite understand how I am supposed to use it. From what I gathered, with Electron I am able to create cross-desktop applications (Chromium) with HTML, CSS and Javascript and do tasks in the background (NodeJS) . What confuses me is the following: How am I supposed to use this with my server? For example , I built a simple NodeJS application that uses Passport and a few other modules to create a

Configuring electron-webpack renderer to work with nodeIntegration: false

你。 提交于 2019-12-10 14:48:36
问题 I'm attempting to configure electron-webpack's renderer build settings so that they work in a browser window set up with nodeIntegration set to false. This means that node APIs aren't available, which is causing the following problems: webpack seems to be assuming that there is an implementation of require already available so isn't including its own in the produced bundle, but instead is simply adding the bundled definitions into module.exports (causing an error that module isn't defined

Electron调用C++的DLL

六月ゝ 毕业季﹏ 提交于 2019-12-10 14:47:48
1. 安装ffi-napi npm install ffi-napi 2. c++ dll 注意,若electron是X64的,则dll也应为X64,同理32位。 myAddDll是c++的dll名称,funAdd是其中的一个函数 3. js脚本 numA和numB是两个input文本框,CalcButton是按钮 4. 拷贝myAddDll.dll 将myAddDll.dll拷贝至electron项目根目录下的dll文件夹,执行: npm start 完整源码 来源: https://www.cnblogs.com/fansite/p/12016361.html

How can I include partial html in github's electron framework?

丶灬走出姿态 提交于 2019-12-10 13:46:21
问题 In github's electron, is there a built-in mechanism for including partial html files? for example, if I design a layout in html <body> <div> <ul><li>Menu Item 1</li><li>Menu Item 2</li></ul> </div> <div id="dynamic-content"> <!-- I would like this content to be loaded from partial html files --> </div> </body> How would I put content from different files into the div with id "dynamic-content"? 回答1: There are many ways to do that. At all you didn't give any information about when you want to

Can't succeed in making transparent window in Electron (javascript)

a 夏天 提交于 2019-12-10 13:41:19
问题 I am trying to make a transparent window with ElectronJs but I obtain a black background. I am on Linux (Debian Jessie) I have tried different versions : latest, beta and nightly with the same result. I have a version for NW.js that works on the same machine, so I expect it is a Electron problem. Here is my code of main.js : const {app, BrowserWindow} = require('electron'); let mainWindow; function createWindow () { mainWindow = new BrowserWindow({width: 920, height: 300, frame:true,

Is it possible to catch exceptions of renderer processes in electrons main process?

核能气质少年 提交于 2019-12-10 13:38:11
问题 I'm using Electrons Quick Start Projekt (Commit dbef48ee7d072a38724ecfa57601e39d36e9714e) to test exceptions. In index.html I changed the name of the required module from renderer.js to rendererXXX.js . require('./renderer.js') which results in an expected Exeption (it is visible in the devtools for that window): Uncaught Error: Cannot find module './rendererXXX.js' Now it would be nice if the main-process (see main.js ) is aware that one renderer process failed. Thus I wrapped the

nodeJS / Electron renders pages slower than Chrome

陌路散爱 提交于 2019-12-10 13:23:59
问题 We are building a restaurant POS system with Electron (nodeJS 7.4.0/Electron 1.6.11). For a POS system, speed and reliability are the 2 most important requirements, and after having spent some time building the app we are no longer certain if Electron is the right software for us. Speed seems to be the main issue. For testing, we've built an app that only shows 2 "hello world" html pages without any additional javascript or any other assets. When running on a modern iMac, there's a short

Cannot read property 'on' of undefined in electron javascript

谁说胖子不能爱 提交于 2019-12-10 13:15:21
问题 I am trying to run this code but every time I am getting this error message. First I installed npm globally. Then I installed it within my app but still getting same error. Uncaught TypeError: Cannot read property 'on' of undefined at Object. (H:\electric\main.js:12:4) at Object. (H:\electric\main.js:63:3) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load

fs.stat birthtime/birthtimeMs in Linux and MacOS

允我心安 提交于 2019-12-10 11:37:18
问题 One of the properties of the fs.Stats object that is returned when one calls fs.stat is birthtime and birthtimeMs , which I'm assuming is when the file was created. Stats { dev: 2114, ino: 48064969, mode: 33188, nlink: 1, uid: 85, gid: 100, rdev: 0, size: 527, blksize: 4096, blocks: 8, atimeMs: 1318289051000.1, mtimeMs: 1318289051000.1, ctimeMs: 1318289051000.1, birthtimeMs: 1318289051000.1, // this value atime: Mon, 10 Oct 2011 23:24:11 GMT, mtime: Mon, 10 Oct 2011 23:24:11 GMT, ctime: Mon,