Selenide 7.6.0 Video recorder not working / wrong implementation

I finally got around to upgrading the Selenide version from a month ago, and I got interested in the new feature regarding test recording.

I wanted to implement it in one of my codes:
Selenide-JUnit5-Cucumber
Selenide-TestNG-Cucumber

Unfortunately, both attempts ended with a failure. Following the documentation, it seems the topic is simple, but I can’t figure out what exactly needs to be done to make it work in the simplest possible form.

CucumberRunner

@EnableVideo
    @ExtendWith(VideoRecorderExtension.class)
    public class RunCucumberTests
    {
    
    }

StepDefinition

@ExtendWith(VideoRecorderExtension.class)
@EnableVideo
public class StarterStep
{
    @BeforeAll 
    static void setUp() {
        // Konfiguracja ścieżki do nagrań

        System.setProperty("selenide.video.directory", "target/videos"); 
        System.setProperty("selenide.video.enabled", "true"); 

    }
    @Video
    @Given("Start testing")
    public void openBrowser(){
        open("https://www.saucedemo.com/");
    }

Selenide Configuration.class i don’t see there any methods which can handle video records. like video enable etc.

package com.codeborne.selenide;

import org.jspecify.annotations.Nullable;
import org.openqa.selenium.MutableCapabilities;

public class Configuration {
    private static final SelenideConfig defaults = new SelenideConfig();
    public static String baseUrl;
    public static long timeout;
    public static long pollingInterval;
    /** @deprecated */
    @Deprecated
    public static boolean holdBrowserOpen;
    public static boolean reopenBrowserOnFail;
    public static String browser;
    public static @Nullable String browserVersion;
    public static @Nullable String remote;
    public static @Nullable String browserSize;
    public static @Nullable String browserPosition;
    public static MutableCapabilities browserCapabilities;
    public static String pageLoadStrategy;
    public static long pageLoadTimeout;
    public static boolean clickViaJs;
    public static boolean screenshots;
    public static boolean savePageSource;
    public static String reportsFolder;
    public static String downloadsFolder;
    public static @Nullable String reportsUrl;
    public static boolean fastSetValue;
    public static TextCheck textCheck;
    public static SelectorMode selectorMode;
    public static AssertionMode assertionMode;
    public static FileDownloadMode fileDownload;
    public static boolean proxyEnabled;
    public static @Nullable String proxyHost;
    public static int proxyPort;
    public static boolean webdriverLogsEnabled;
    public static boolean headless;
    public static @Nullable String browserBinary;
    public static long remoteReadTimeout;
    public static long remoteConnectionTimeout;

    public Configuration() {
    }

    public static SelenideConfig config() {
        return (new SelenideConfig()).baseUrl(baseUrl).timeout(timeout).pollingInterval(pollingInterval).holdBrowserOpen(holdBrowserOpen).reopenBrowserOnFail(reopenBrowserOnFail).browser(browser).browserVersion(browserVersion).remote(remote).browserSize(browserSize).browserPosition(browserPosition).browserCapabilities(browserCapabilities).pageLoadStrategy(pageLoadStrategy).pageLoadTimeout(pageLoadTimeout).clickViaJs(clickViaJs).screenshots(screenshots).savePageSource(savePageSource).reportsFolder(reportsFolder).downloadsFolder(downloadsFolder).reportsUrl(reportsUrl).fastSetValue(fastSetValue).textCheck(textCheck).selectorMode(selectorMode).assertionMode(assertionMode).fileDownload(fileDownload).proxyEnabled(proxyEnabled).proxyHost(proxyHost).proxyPort(proxyPort).webdriverLogsEnabled(webdriverLogsEnabled).headless(headless).browserBinary(browserBinary).remoteReadTimeout(remoteReadTimeout).remoteConnectionTimeout(remoteConnectionTimeout);
    }

    static {
        baseUrl = defaults.baseUrl();
        timeout = defaults.timeout();
        pollingInterval = defaults.pollingInterval();
        holdBrowserOpen = defaults.holdBrowserOpen();
        reopenBrowserOnFail = defaults.reopenBrowserOnFail();
        browser = defaults.browser();
        browserVersion = defaults.browserVersion();
        remote = defaults.remote();
        browserSize = defaults.browserSize();
        browserPosition = defaults.browserPosition();
        browserCapabilities = defaults.browserCapabilities();
        pageLoadStrategy = defaults.pageLoadStrategy();
        pageLoadTimeout = defaults.pageLoadTimeout();
        clickViaJs = defaults.clickViaJs();
        screenshots = defaults.screenshots();
        savePageSource = defaults.savePageSource();
        reportsFolder = defaults.reportsFolder();
        downloadsFolder = defaults.downloadsFolder();
        reportsUrl = defaults.reportsUrl();
        fastSetValue = defaults.fastSetValue();
        textCheck = defaults.textCheck();
        selectorMode = defaults.selectorMode();
        assertionMode = defaults.assertionMode();
        fileDownload = defaults.fileDownload();
        proxyEnabled = defaults.proxyEnabled();
        proxyHost = defaults.proxyHost();
        proxyPort = defaults.proxyPort();
        webdriverLogsEnabled = defaults.webdriverLogsEnabled();
        headless = defaults.headless();
        browserBinary = defaults.browserBinary();
        remoteReadTimeout = defaults.remoteReadTimeout();
        remoteConnectionTimeout = defaults.remoteConnectionTimeout();
    }
}

New contributor

Mati.M is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

While your are using JUnit 5 to run Cucumber that does not mean you can use extensions.

https://junit.org/junit5/docs/current/user-guide/#overview-what-is-junit-5

Unlike previous versions of JUnit, JUnit 5 is composed of several different modules from three different sub-projects.

JUnit 5 = JUnit Platform + JUnit Jupiter + JUnit Vintage

Here JUnit Jupiter, JUnit Vintage and Cucumber are test engines on the JUnit Platform. And extensions are a Jupiter concept that can only be used with JUnit Jupiter.

Fortunately the video recorder extensions is relatively simple. If you look at the source
you can probably use the VideoRecorder with Cucumber using the @BeforeAll, @AfterAll, @Before and @After hooks.

4

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật