Skip to content

v0.1.6 — New Features Added

Choose a tag to compare

@naveenanimation20 naveenanimation20 released this 27 Sep 03:42
· 39 commits to main since this release

Playwright for Java users: please upgrade. Auto-capture did not work in 0.1.5 — see the first item.

Fixed

  • Playwright auto-capture was silently doing nothing. RlPlaywright.attach(page) is normally called from @BeforeMethod / @BeforeEach, but both TestNG and JUnit run those hooks before the "test started" callback the bindings used, so there was no current test to attach to — no API rows, no trace, no failure screenshot. The test slot now opens before setup hooks run (TestNG IConfigurationListener.beforeConfiguration, JUnit BeforeEachCallback).
  • Rl.attach() / Rl.log() called from @AfterMethod / @AfterEach now land on the test that just finished. Previously the slot was already cleared, so Selenium teardown screenshots were dropped.
  • Multi-tab flows: with RlPlaywright.attach(BrowserContext) the trace for a test that opened a popup was never attached. Every page of a test is now tracked; the trace is attached once and the failure screenshot comes from the most recent page still open.
  • A skipped test no longer receives a screenshot or trace under any policy (always and only-on-pass included).
  • JUnit 5 assumption failures (Assumptions.assumeTrue) are reported as skipped, not failed.
  • reporting-labs.properties is read as UTF-8; non-ASCII titles rendered as mojibake before.
  • Header masking ignores - and _, so X-Api-Key, x_auth_token etc. are masked like apiKey / authToken.

Added

  • Rl.shouldCaptureScreenshot() / shouldCaptureTrace() / shouldCaptureVideo() — no-arg helpers that combine the capture policy with the outcome of the current or just-finished test. A Selenium / Appium BaseTest needs neither ITestResult nor a TestWatcher:
    @AfterMethod(alwaysRun = true)
    public void tearDown() {
        if (Rl.shouldCaptureScreenshot()) {
            Rl.attach("screen.png", "image/png",
                      ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES));
        }
        driver.quit();
    }