How to install appium drivers programmatically in Nodejs

Hi,

I have an electron app with package.json like this:


“dependencies”: {
“appium”: “^2.0.1”,

},

I am requiring “appium” lib and creating an appium instance. But I can not find any docs how to install drivers using appium instance.

const appium = require(‘appium’);
appium.installDriver(DriverName) → This is what I want to do

How can I install XCTest and UIA2 by using appium instance (not from terminal) in NodeJS ?

Check https://appium.io/docs/en/2.0/guides/managing-exts/

I don’t want to add drivers to my package.json. I just want to install drivers programmatically