testproject-io / javascript-opensdk

TestProject OpenSDK for Node.js
Apache License 2.0
24 stars 16 forks source link

A screenshot does not appear in testproject.io #27

Open ShaharGilad opened 3 years ago

ShaharGilad commented 3 years ago

Running the following code:

describe.only('search youtube Edge', () => {
    let driver;

    before(async () => {
        driver = await new Builder().forBrowser('MicrosoftEdge').withToken(CONSTANT.TOKEN).build();
    });

    after(async () => {
        await driver.quit(); 
    });

    it('Search movie and take screenshot', async() => {
        await driver.get(CONSTANT.BASE_URL);
        await driver.findElement(By.id(CONSTANT.YOUTUBE_SEARCH_ID)).sendKeys(CONSTANT.SEARCH_VALUE);
        await driver.findElement(By.id(CONSTANT.SEARCH_BUTTON)).click();
        await driver.report().step('Youtube result screenshot', 'Screenshot', true);
    });
});

await driver.report().step('Youtube result screenshot', 'Screenshot', true); Show the step without screenshot:

image