CodeceptJS v2.6.0 Release Notes

Release Date: 2020-03-31 // about 4 years ago
    • ⚡️ [Playwright] Updated to Playwright 0.12 by @Georgegriff.

    ⬆️ Upgrade playwright to 0.12:

    npm i playwright@^0.12 --save
    

    🚀 Notable changes:

    • Fixed opening two browsers on start
    • executeScript - passed function now accepts only one argument. Pass in objects or arrays if you need multtple arguments: js // Old style, does not work anymore: I.executeScript((x, y) => x + y, x, y); // New style, passing an object: I.executeScript(({x, y}) => x + y, {x, y});
    • click - automatically waits for element to become clickable (visible, not animated) and waits for navigation.
    • clickLink - deprecated
    • waitForClickable - deprecated
    • forceClick - added
    • Added support for custom locators. See #2277
    • Introduced device emulation:
      • globally via emulate config option
      • per session

    ⚡️ [WebDriver] Updated to webdriverio v6 by @PeterNgTr.

    🚀 Read release notes, then ⬆️ upgrade webdriverio to 6.0:

    npm i webdriverio@^6.0 --save
    

    🚚 (webdriverio v5 support is deprecated and will be removed in CodeceptJS 3.0)

    👍 [WebDriver] Introduced Shadow DOM support by @gkushang

    I.click({ shadow: ['my-app', 'recipe-hello', 'button'] });
    
    • 🛠 Fixed parallel execution of run-workers for Gherkin scenarios by @koushikmohan1996
    • 📦 [MockRequest] Updated and moved to standalone package:
      • full support for record/replay mode for Puppeteer
      • added mockServer method to use flexible PollyJS API to define mocks
      • fixed stale browser screen in record mode.
    • 🔌 [Playwright] Added support on for screenshotOnFail plugin by @amonkc
    • 👀 Gherkin improvement: setting different tags per examples. See #2208 by @acuper
    • ⚡️ [TestCafe] Updated click to take first visible element. Fixes #2226 by @theTainted
    • ⚡️ [Puppeteer][WebDriver] Updated waitForClickable method to check for element overlapping. See #2261 by @PiQx
    • 👍 [Puppeteer] Dropped puppeteer-firefox support, as Puppeteer supports Firefox natively.
    • 👀 [REST] Rrespect Content-Type header. See #2262 by @pmarshall-legacy
    • 👀 [allure plugin] Fixes BeforeSuite failures in allure reports. See #2248 by @Georgegriff
    • 👀 [WebDriver][Puppeteer][Playwright] A screenshot of for an active session is saved in multi-session mode. See #2253 by @ChexWarrior
    • 🛠 Fixed --profile option by @pablopaul. Profile value to be passed into run-multiple and run-workers:
    npx codecept run-workers 2 --profile firefox
    

    👀 Value is available at process.env.profile (previously process.profile). See #2302. Fixes #1968 #1315

    __`Given`;
    I.amOnPage('/profile')
    
    __`When`;
    I.click('Logout');
    
    __`Then`;
    I.see('You are logged out');