spectron | DEPRECATED : 🔎 Test Electron apps using ChromeDriver

 by   electron-userland JavaScript Version: v19.0.0 License: MIT

kandi X-RAY | spectron Summary

kandi X-RAY | spectron Summary

spectron is a JavaScript library typically used in User Interface, Electron applications. spectron has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Easily test your Electron apps using ChromeDriver and WebdriverIO.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              spectron has a medium active ecosystem.
              It has 1676 star(s) with 267 fork(s). There are 52 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 234 open issues and 169 have been closed. On average issues are closed in 267 days. There are 31 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of spectron is v19.0.0

            kandi-Quality Quality

              spectron has 0 bugs and 0 code smells.

            kandi-Security Security

              spectron has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              spectron code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              spectron is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              spectron releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              spectron saves you 85 person hours of effort in developing the same functionality from scratch.
              It has 233 lines of code, 0 functions and 40 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed spectron and discovered the below as its top functions. This is intended to give you an instant insight into spectron implemented functionality, and help decide if they suit your requirements.
            • Application constructor .
            • add all main functions to the main modules
            • Creates a new ChromeDriver driver .
            • ignore module name
            • Transform an object
            • call a module api
            • add current window to current window
            • region public API methods
            • Check if a remote function is a function
            • ignore api name
            Get all kandi verified functions for this library.

            spectron Key Features

            No Key Features are available at this moment for spectron.

            spectron Examples and Code Snippets

            No Code Snippets are available at this moment for spectron.

            Community Discussions

            QUESTION

            Spectron app.start() isn't launching the app
            Asked 2021-Sep-08 at 20:05

            I'm relatively new to Spectron and Jest and I can't figure out why the app isn't launching when I call app.start() in my unit test. Right now when I run npm test, the app won't start, eventually times out (even after 30 seconds) and always sends this error message:

            Timeout - Async callback was not invoked within the 15000 ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 15000 ms timeout specified by jest.setTimeout. at mapper (node_modules/jest-jasmine2/build/queueRunner.js:27:45)

            So far I've tried:

            • making sure I'm using the correct versions of spectron and electron (11.0.0 and 9.0.0 respectively)
            • running npm test from my root folder, my src folder, and my tests folder.
            • deleting my node_modules folder, reinstalling everything, and rebuilding the app.
            • using path.join(__dirname, '../../', 'node_modules', '.bin', 'electron') as my app.path.

            Here's my test1.js file:

            ...

            ANSWER

            Answered 2021-Sep-08 at 20:05

            I came across this Spectron tutorial on YouTube: https://www.youtube.com/watch?v=srBKdQT51UQ

            It was published in September 2020 (almost a year ago as of the time of this post) and they suggested downgrading to electron 8.0.0 and Spectron 10.0.0. When I downgraded, the app magically launched when app.start was called.

            Source https://stackoverflow.com/questions/69107413

            QUESTION

            SyntaxError: Support for the experimental syntax 'decorators-legacy' isn't currently enabled
            Asked 2021-Sep-07 at 20:28

            I'm working on an electron app, using React on the front end and I'm attempting to use Jest for testing. However, when I try to run tests I get the following error:

            SyntaxError: C:\Users\JimArmbruster\source\repos\cyborg_cloud_explorer\cyborg_cloud_explorer_gui\src\assets\custom_components\stylesheets\buttons.css: Support for the experimental syntax 'decorators-legacy' isn't currently enabled (1:1):

            ...

            ANSWER

            Answered 2021-Sep-07 at 18:34

            Jest won't use the babel plugins out of the box, you need to install some additional packages.

            With yarn:

            yarn add --dev babel-jest babel-core regenerator-runtime

            With npm:

            npm install babel-jest babel-core regenerator-runtime --save-dev

            Jest should then pick up the configuration from your .babelrc or babel.config.js.

            Source: https://archive.jestjs.io/docs/en/23.x/getting-started.html#using-babel

            Source https://stackoverflow.com/questions/69091261

            QUESTION

            Electron app not completely visible on test execution server
            Asked 2021-Jun-28 at 07:24

            I have been having some issues with executing my cucumber scenarios successfully because, for some unknown reason, the electron app we are testing isn't completely shown (table with 1 missing column on the right). For some reason, this only happens on our windows test execution server, not on my local laptop. Server resolution is 1920x1080. Tests are started via Azure DevOps Server pipeline.

            We test the electron app via spectron with the cucumber-js framework in typescript.

            ...

            ANSWER

            Answered 2021-Jun-28 at 07:24

            For anyone that might encounter this issue in the future. What solved my issue was pretty basic. Just had to set the bounds of the client application manually.

            Source https://stackoverflow.com/questions/68018053

            QUESTION

            Electron doesn't launch app after run it in development
            Asked 2021-Apr-29 at 16:59

            I Know that there is a lot of topic about this, but since none of them work, I must make a new one, I'm quite confused as why my electron app doesn't launch when I used yarn dev for my project, but when my friends try it, in his laptop, he can run and the apps launch normally without any problem, so Is there anyone here ever face the same problem with me? if there is someone, how can you solve this problem?

            this is what my terminal looks like:

            for information I used:

            ...

            ANSWER

            Answered 2021-Apr-28 at 12:55

            This may be a silly answer. Try checking whether the task is running or any other programs interfereing the app, like an antivirus.

            Source https://stackoverflow.com/questions/67296408

            QUESTION

            Incorrect NODE_MODULE_VERSION when using ava
            Asked 2020-Nov-18 at 23:53

            I write an Electron app that uses nodegit. For my test part I use ava in combination with Spectron to test my app. All of my tests work - including functions which use nodegit in my app.

            In addition to the tests described above I made also a pure non-Electron test file in which I import nodegit directly.

            ...

            ANSWER

            Answered 2020-Nov-14 at 14:01

            Hey) I think I can solve your problem, just try this:

            Source https://stackoverflow.com/questions/64625765

            QUESTION

            unknown error: Chrome failed to start: exited abnormally when trying to test electron spectron with mocha
            Asked 2020-Sep-17 at 04:59

            i'm trying to test electron spectron testing. my project is very simple, just clone an electron quick start repo then write code to spec.js as written from the readme file from electron-userland/spectron

            but when i run npm test, i face this error:

            ...

            ANSWER

            Answered 2020-Sep-17 at 04:59

            i've downgrade my electron version to 9.3.1 and now my project working normally. You can find specific information about electron and spectron version that can support each other from electron-userland/spectron

            Source https://stackoverflow.com/questions/63929325

            QUESTION

            How can I `await` closing of window in Spectron?
            Asked 2020-Apr-03 at 08:55

            I'm working on Electron application that handles some logic in modal windows. Those windows are waiting for async actions to resolve and then self-close. Now I am struggling to test this behaviour using Spectron and Jest: seems that there are no methods to catch window's closing and then proceed to another tests.

            Currently my code is

            ...

            ANSWER

            Answered 2020-Apr-03 at 08:55
            await app.client.waitUntil(async () => (await app.client.getWindowCount()) === 1);
            

            Source https://stackoverflow.com/questions/60842420

            QUESTION

            Appium-based framework for testing desktop app (not web)
            Asked 2020-Mar-30 at 11:40

            Anyone had experience in automating desktop applications (not web)? I need an Appium-like solution to integrate it with my mobile automation (written on Appium, Java).

            Our company has a messenger client on 3 platforms: Android, iOS and desktop. Client data is synchronized between these platforms. We already have a basic automation for mobile platforms (using Appium). Now I need to develop automation for desktop.

            I want an Appium-like solution, so it would be easy to integrate with our mobile automation. I found WinAppDriver, but it is for Windows only. Most likely our desktop app will be cross-platform (Windows, Mac OS, Linux).

            Is there any solution simular to WinAppDriver, but cross-platform?

            Our desktop app is based on Electron, so probably I could test it with Spectron (it is cross-platform). But I doubt that the integration with Appium will be fine.

            ...

            ANSWER

            Answered 2020-Mar-30 at 11:40

            Edited:

            Little late, but:

            The Electron windows native application can be tested with Selenium using good ol' ChromeDriver. It's not over Appium (didn't find a way to spawn windows app with ChromeDriver over Appium), but it works out of the box, and the element locators will be the same, so you could reuse your tests, just initiate the driver differently: by setting the binary in ChromeOptions to your executable file, and calling the ChromeDriver constructor instead of RemoteWebDriver. Refer to this article for details.

            Haven't experimented with MacOS yet, but found this, might be of help.

            Source https://stackoverflow.com/questions/60755863

            QUESTION

            DataTable: Print Not working in Angular 9 and Electron
            Asked 2020-Feb-15 at 08:31

            I have an android 9 app recently converted to Electron app. For DataTable, I have enabled Print and Excel options. Excel upload is fine and exporting data. But Print is not working. Its giving the following error

            ...

            ANSWER

            Answered 2020-Feb-15 at 08:31

            The information given in the post helped me ( angular application build in electron print a div shows blank window ).

            The answer is : in main.ts for electron, need to add nativeWindowOpen: true as below.

            Source https://stackoverflow.com/questions/60236676

            QUESTION

            How to run two different wdio.config.js file one after another
            Asked 2020-Feb-11 at 20:03

            I currently have two wdio.config.js files with different configurations. How can i run both one after another? Is it possible?

            This is how I am defining in the code:

            first config.js

            ...

            ANSWER

            Answered 2020-Jan-09 at 09:33

            Create individual test command for both config files. Then add a new script in package.json having both the test commands separated by &&.

            https://stackoverflow.com/a/53809731/8903949

            (Or)

            Use gulp or grunt task.

            Source https://stackoverflow.com/questions/59650841

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install spectron

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/electron-userland/spectron.git

          • CLI

            gh repo clone electron-userland/spectron

          • sshUrl

            git@github.com:electron-userland/spectron.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular JavaScript Libraries

            freeCodeCamp

            by freeCodeCamp

            vue

            by vuejs

            react

            by facebook

            bootstrap

            by twbs

            Try Top Libraries by electron-userland

            electron-builder

            by electron-userlandTypeScript

            electron-forge

            by electron-userlandTypeScript

            devtron

            by electron-userlandJavaScript

            electron-json-storage

            by electron-userlandJavaScript

            electron-compile

            by electron-userlandJavaScript