admc / wd

A node.js client for webdriver/selenium 2.
Other
1.53k stars 402 forks source link

add startRecordingScreen() and stopRecordingScreen() #577

Closed frananleo closed 4 years ago

frananleo commented 5 years ago

Hi!

the functions from Appium startRecordingScreen() and stopRecordingScreen() are not implemented in the WD last version.

in commands, you have to add:

commands.startRecordingScreen = function() { var fargs = utils.varargs(arguments); var cb = fargs.callback, filePath = fargs.all[0], videoSize = fargs.all[1], timeLimit = fargs.all[2], bitRate = fargs.all[3]; var data = {"options":{filePath:filePath, videoSize: videoSize, timeLimit: timeLimit, bitRate:bitRate}} this._jsonWireCall({ method: 'POST' , relPath: '/appium/start_recording_screen' , data: data , cb: simpleCallback(cb) }); };

commands.stopRecordingScreen = function() { var cb = findCallback(arguments); this._jsonWireCall({ method: 'POST' , relPath: '/appium/stop_recording_screen' , cb: callbackWithData(cb, this) }); };

yusufunlumbvn commented 5 years ago

Thanks for sample code to workaround solution @frananleo. Do I have to give remotePath ? Can you share a minimal rest request ? Thanks a lot