How to use the node-simctl.setPasteboard function in node-simctl

To help you get started, we’ve selected a few node-simctl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appium / appium-xcuitest-driver / lib / commands / pasteboard.js View on Github external
commands.mobileSetPasteboard = async function mobileSetPasteboard (opts = {}) {
  if (!this.isSimulator()) {
    throw new Error('Setting pasteboard content is not supported on real devices');
  }
  const {content, encoding} = opts;
  if (!content) {
    throw new Error('Pasteboard content is mandatory to set');
  }
  return await setPasteboard(this.opts.udid, content, encoding);
};