electron

Unable to connect to the electron / CEF app using selenium web driver

独自空忆成欢 提交于 2020-06-21 05:41:46
问题 I am trying to automate [electron-api-demos][1]app using this sample code. public static void main(String args[]) throws IOException, InterruptedException { int port = 9223;// Open App Runtime.getRuntime().exec( "C:\\Program Files\\Sample.exe" , null, new File("C:\\Program Files\\Sample" )); ChromeOptions options = new ChromeOptions(); String remoteDebuggingAddress = "localhost:" + port; options.setExperimentalOption("debuggerAddress", remoteDebuggingAddress); options.addArguments("remote

Overriding Self-Signed SSL Certificate Warnings with Electron

时间秒杀一切 提交于 2020-06-17 14:15:26
问题 There are two prior questions leading to this question (if you're interested): ssl-for-intranet-applications-deployed-at-multiple-companies distributing-ssl-certificates-to-all-browsers-in-an-active-directory-environment In Electron, do you have the ability to override SSL certificate warnings that you'd typically get when using self-signed certificates via a modern web browser? Typically, in desktop applications, you do not have to adhere to the strict online-banking-level certificate

Regex pattern to ignore multiple folders

核能气质少年 提交于 2020-06-17 00:14:29
问题 How is the correct syntax to ignore more then one files and folders for electron-packager? With only one arg like: --ignore=docs/* it works fine. But I want to ignore more then one folder and files like: --ignore=docs/* + dev/* + someFile.js 回答1: Use the OR statement in the regular expression by using the | character in stead of the + character. --ignore="docs/.*|dev/.*|somefile\.js" 回答2: This variant works for me --ignore=\"(docs*|dev*|somefile\.js)\" 回答3: For anyone out there who's looking

Add custom page/field to NSIS setup created with electron-builder

我与影子孤独终老i 提交于 2020-06-16 04:47:29
问题 I have created an Electron app which is packaged into an NSIS installer with electron-builder. Now I would like to add a custom text field to the installer, where the user can input a value (the value should be saved to disk/registry, it needs to be available in the app later). I saw there is a customWelcomePage macro defined in the installer, which could probably be (mis)used for this purpose? But how would I create a macro which creates a complete page? NSIS is completely new to me, and the

XSRF - how to set cross-origin cookie

你说的曾经没有我的故事 提交于 2020-06-14 04:26:50
问题 I have developed REST API, and two JavaScript clients (Single Page App & native app - based on electron). In both clients my users are authenticating via OAuth2 flow: sends user-password to server gets access_token (in plain text) and refresh_token (in httponly cookie) when token expires they are refreshing it sending request to /refresh endpoint (server reads refresh_token from cookie) Now I would like to implement csrf protection. So I implemented it on my back-end side (Spring): @Override

XSRF - how to set cross-origin cookie

亡梦爱人 提交于 2020-06-14 04:26:05
问题 I have developed REST API, and two JavaScript clients (Single Page App & native app - based on electron). In both clients my users are authenticating via OAuth2 flow: sends user-password to server gets access_token (in plain text) and refresh_token (in httponly cookie) when token expires they are refreshing it sending request to /refresh endpoint (server reads refresh_token from cookie) Now I would like to implement csrf protection. So I implemented it on my back-end side (Spring): @Override

How to package R shiny app in electron with included Rcpp code

最后都变了- 提交于 2020-06-13 05:40:14
问题 I am trying to package a shiny app as a standalone application using electron as per: https://github.com/ColumbusCollaboratory/electron-quick-start A portable R instance is used and electron calls it to create the shiny app. I need to do this as the app I am building is for someone who doesn't have R installed and doesn't want it installed. This works great until I try to 'sourceCpp' files written in Rcpp. I get the error: Error in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir

Disable keyboard shortcuts Alt + Tab in electron application

痞子三分冷 提交于 2020-06-12 07:27:10
问题 I am building an application using JavaScript, node.js, and Electron. Part of this application is designed to lock the computer until the user authenticates themselves. This works, however I need to make my application disable the alt + tab keyboard shortcut, as currently the user can use this to skip over my lock page (and thus be able to use the computer without having been authenticated). Any suggestions would be appreciated. 回答1: You could turn on kiosk mode for the window which makes it

Saving JSON in Electron

风流意气都作罢 提交于 2020-06-11 21:31:39
问题 I am building an app using Electron. In this app, I am building a data structure using JSON. My data structure looks like this: { items: [ { id:1, name:'football' }, { id:2, name:'soccer ball' }, { id:3, name:'basketball' } ] } I want to save this JSON to a file called "data.json". I want to save it to a file because I want to load the next time the application starts. My challenge is, I do not know how to save the data. In fact, I'm not sure where I should even save the file. Do I save it in

Saving JSON in Electron

让人想犯罪 __ 提交于 2020-06-11 21:28:04
问题 I am building an app using Electron. In this app, I am building a data structure using JSON. My data structure looks like this: { items: [ { id:1, name:'football' }, { id:2, name:'soccer ball' }, { id:3, name:'basketball' } ] } I want to save this JSON to a file called "data.json". I want to save it to a file because I want to load the next time the application starts. My challenge is, I do not know how to save the data. In fact, I'm not sure where I should even save the file. Do I save it in