How to test external browser pages on electron application using testcafe - vue.js

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.

Related

Bowser disable cross domain cookies in Firefox for opening Visualforce page in an automated browser

I am trying to open a Visualforce page in Firefox using an automation tool (Web driver). While trying this, every time automated browser open the VF page it shows:
We can't display this page because your browser blocks cross-domain
cookies. Try again with a different supported browser.
How to run automation test script for the VisualForce Pages?

How to detach Cypress test runner from a page?

I'm trying to use Cypress with a site that redirects users to a third-party site for authentication. Once a user logs in, they're automatically redirected back to the site we control. From what I've read, Cypress doesn't support this particular set up.
Authentication at the third-party site can happen through a popup as well. And I can make Cypress open that popup.
Is there a way I can detach the Cypress test runner from the log-in popup so that it's no longer under control by Cypress? If so, how is this done? I would like to do this so that I can automate the log-in with something else (namely, Puppeteer) and then run the actual tests in the base page in the Cypress iframe.
Since you can assume the AUT is accepting a request from the 3rd party at some point in time, there should be a solution where you fire that api request with cy.request in the same manner as the UI.
You'll likely have to store environment variables, or some other auth security for the key, but if you do that, the login flow can be replicated by Cypress without having to use their 3rd party code; which you won't be able to access with Cypress if it's an iframe or other common 3rd party auth UI setup.

Jmeter load testing in SPA

I am beginner in Load testing and I am doing load testing using JMeter on a single page web application. The issue which I am facing right now that as you know in SPA there is a single URL and page contains multiple tabs, how I can switch between the tabs using JMeter. You can see my test plan in below image.
I Know I have little knowledge, any link or guidelines are welcome as there is a limited information on google regarding SPA.
Do not compare the load testing with automation testing. Jmeter can only trigger the request that your system is sending to server. The steps you need to do:
Open your URL in chrome/firefox
Inspect the page or tap f12 on keyboard.
Go to network tab
Now click on the tabs you have in your webpage
check if there is any request being passed to server when navigating through tabs.
If yes, replicate the same request by adding a HTTP Request in jmeter and provide the request headers and parameters same as that of the request being passed.

Change WebDriver from GUI to Headless

I want to automate an application for an upload process with selenium.Therefore I am using geckodriver. Right now I am doing the login site headless but I want to do the login by the user and then change to headless. Is there a way to do that or at least a work around?
There is no way to do that using the same browser instance... The headless flag is a setting passed to the browser on startup and there is no way to dynamically change that.
If the site uses cookie-based authentication, here is an alternate approach:
login with browser in normal (GUI) mode
export saved cookies
instantiate a new browser in headless mode
navigate to the site again with the headless driver
add saved cookies to the new headless driver
... at that point, you can navigate to an authenticated page. You should be "logged in" since you are re-using the cookies from the original browser session.

How to open Electron-based application using Nightwatch framework?

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