How to open Electron-based application using Nightwatch framework? - selenium

I am looking to automate electron based application, using nightwatch.js
I tried to do it using Java/Selenium but did not succeeded as I was able to open application but not able to perform any action after opening.
Now I read about Nightwatch JS which uses webdriverIO which can help us automate web based applications.
As Electron app is window based application which opens web view in it so thinking of using it.

I managed to do the same and have uploaded a sample project in Github for reference at https://github.com/rik12s/ElectronApp-Automation-Nightwatch.git

Related

Can we use Appium and Selenium together for testing and comparing app data with web data?

We are testing on moblie app using Appium, Which feature is to upload a video on Server. After uploading video it will be visible on Dashboard of Website. The dashboard feature is not present in mobile app. So here We need to check that Video related details using Selenium as it is on Website. Any Suggestion? How can we do this without performing separate tests.
This is integration testing so are in effect two different tests/steps.
You could do it in one project though so you could do something like:
open your mobile app using Appium
upload the video
open a browser using webdriver
navigate to the relevant page and check the video uploaded
close the browser
continue testing or close the mobile app

Automate flutter web application using selenium webdriver

I am new to flutter. So, I want to know whether I can use selenium webdriver/java to automate a flutter web application.
I have used java / cucumber to automate web applications and used page object pattern. so, can I do the same technologies to automate a flutter web application ?.
Yes you can, because the automation code is going run on top of the application. So there is no restriction. There is a package available in flutter WebDriver maybe you can try this out . And here is the API documentation.

How to test external browser pages on electron application using testcafe

I'm currently doing E2E testing using testcafe on an electron-vue application. In my authentification phase, I connect to another external application :enter username and password to authenticate. The problem is that I cannot apply test case on the external browser nor recuperate inputs from the external browser. Any suggestions( The external page is triggered via a Vue component button using open method)
At the moment, TestCafe can run a test in a single browser window only. Take a look at the Mocking HTTP Requests functionality. By using it, you can mock requests to and responses from the external application to avoid an external browser window opening.

How to get page source for mobile NATIVE (without webviews) app using selenium?

How to get page source for mobile NATIVE (without webviews) app using selenium preferably in javascript?
Depends on your chosen javascript client.
For example, with wd, you would use wd.source(); as can be found from the wd api page: https://github.com/admc/wd/blob/master/doc/api.md
For webdriver-io, the command seems to be client.source();, as found from http://webdriver.io/api/protocol/source.html
If you want to use the selenium-webdriver, it seems that the command would be driver.getPageSource(); as per http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebDriver.html#getPageSource

Convert XUL application to web app

Is it possible to convert an existing XUL application to a pure web application without a complete rewrite? Are there any existing guides on doing this?
There is an existing project based on XUL / Mozilla Application Framework that I would like to see as a web application. But it seems that with FF4 this would no longer be possible.
You can use XUL Runner if you like to keep it like a desktop app or use the Ample SDK which supports XUL in HTML pages and it does a rendering using HTML and JavaScript.