1

so I have downloaded an app, which uses electron framework.

I have managed to click all the needed buttons to generate some server related data.

This test runs approximately 2 minutes, and within this timeframe it generates text withing the textbox.

unfortunately, i cannot access this data , as it doesnt find the path of it.

is there any way to do it?

attached screenshot of that application and its HTML code alongside.

alson, this is my code:

const Application = require('spectron').Application
const assert = require('assert')

const log = require('electron-log');


const {describe} = require('mocha')
const electronPath = require('electron')
const logger = require("electron-packager"); // Require Electron from 

the binaries included in node_modules.
describe('Application launch', async function () {
this.timeout(10000)


beforeEach(async function () {
    this.app = new Application({
        path: '/Applications/fido-conformance-tools-electron.app`/Contents/MacOS/fido-conformance-tools-electron',`


    })
    return this.app.start();
})

afterEach(async function () {
    // if (this.app && this.app.isRunning()) {
    //     return this.app.stop()
    // }
})

it('shows an initial window', async function () {
    await this.app.client.element(`//span[contains(text(),'Server Tests')]`).click();
    await this.app.client.element(`[data-key='serverURL']`).click();
    await this.app.client.element(`[data-key='serverURL']`).setValue('abcd.com');
    await this.app.client.click("//a[@data-upgraded=',MaterialButton,MaterialRipple' and contains(text(),'Run')]");
    await this.app.client.waitUntilTextExists('.passes a','passes',20000)
    // require('electron').remote.getGlobal('setTimeout')(() => { console.log('done'); }, 2000);
    // let isDisplayed = await (await this.app.client.$("[class=suite]:nth-of-type(1) li[class='test pass fast'] h2").waitForDisplayed());
    const data = await this.app.client.getText("[class=suite]:nth-of-type(1) li[class='test pass fast'] h2");
    // const data = await this.app.client.getText("[class='fido-tool-title']")

    log.info(data);

    // this.driver

// // let data;

})

})

the data i want to download is within this textbox (see image)enter image description here

Danny Kaminski
  • 191
  • 2
  • 15

0 Answers0