New answers tagged

1

That depends on what exactly you use. Playwright could be used with jest, mocha, ... Some examples with mocha: package.json: "scripts": { "smoke-test": "./node_modules/.bin/mocha tests/smoke-tests", "regression-test": "./node_modules/.bin/mocha tests/regression-tests" } then you'd run e.g. $ npm run ...


-1

yes, i am using failFast so if we are running a suite which has 30 spec files and each spec file it having on average 5 IT blocks . So now when we run locally or in jenkins if one of the IT blocks fails then the rest of the specs/IT blocks doesnot execute . I wanted fail fast to only mark the particular IT block or Spec to fail and move on to next spec and ...


3

const playwright = require('playwright'); (async () => { const browser = await playwright["chromium"].launch({ headless: false}); const context = await browser.newContext(); const page = await context.newPage(); await page.goto('http://www.google.com/'); await page.screenshot({ path: `example-chromium.png` }); locator ...


1

First, this question really isn't about Cypress, but how JavaScript works. Unfortunately, you can't return multiple values in JavaScript like how you're doing it. What you can do is add your variables to an array or an object. This way, you are returning one type with multiple values. Then when you need to use the returned values, you can read the array ...


0

This works for me in JavaScript: import { Builder, By, Key, until } from "selenium-webdriver"; import chrome from "selenium-webdriver/chrome"; const example = async () => { const options = await new chrome.Options(); options.addArguments("--lang=es"); const driver = await new Builder().forBrowser("chrome&...


Top 50 recent answers are included