0

I am using Zalenium server for nightwatch scripts. I want to disable live video recording.Is there any parameter we can specify in nightwatch.json file?

Found following code for java .Not sure how to use it in nightwatch.js

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability(CapabilityType.BROWSER_NAME,BrowserType.FIREFOX);
desiredCapabilities.setCapability(CapabilityType.PLATFORM_NAME, Platform.LINUX);
desiredCapabilities.setCapability("recordVideo", false);

(https://opensource.zalando.com/zalenium/#usage)

Darren
  • 1,352
  • 5
  • 19
  • 49
Sree Nike
  • 3
  • 2

1 Answers1

0

I don't know how you've setup your Nightwatch capabilities, but at the end of the day, all you have to do is add the recordVideo: false key-value pair inside your capabilities object.

Here is an example for an Android device capabilities config:

const androidConfig = {
  desiredCapabilities: {
      recordVideo: false,
      browserName: 'Chrome',
      platformName: 'Android',
      platformVersion: '7.1.1',
      device: 'Android',
      deviceName: 'Pixel_API_25',
      avd: 'Pixel_API_25',
      autoAcceptAlerts: true,
      chromeOptions: {
      args: ['--disable-notifications', '--disable-device-discovery-notifications', '--disable-web-notification-custom-layouts']
      },
  },
  selenium: {
      cli_args: {
      'webdriver.chrome.driver': './node_modules/.bin/chromedriver',
      }
  }
};
iamdanchiv
  • 4,052
  • 4
  • 37
  • 42