You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I was wondering if you could give me some advice on how to capture a screenshot from the android emulator.
I am working with protractor and appium for connecting to the emulator. Here is the code which I have so far:
varfs=require('fs'),adbClient=require('adbkit').createClient();functionwriteScreenShot(data,filename){varstream=fs.createWriteStream(filename);stream.write(newBuffer(data,'base64'));stream.end();}describe('angularjs homepage todo list',function(){it('should add a todo',function(){browser.get('http://www.angularjs.org');browser.findElement(by.id('add-some-control')).then(function(el){returnel.getLocation();}).then(function(loc){returnbrowser.executeScript('window.scroll(0,'+loc.y+')');}).then(function(){returnadbClient.listDevices();}).then(function(devices){console.log(devices[0].id);returnadbClient.screencap(devices[0].id);}).then(function(png){writeScreenShot(png,'screen.png');});vartodoList=element.all(by.repeater('todo in todos'));expect(todoList.count()).toEqual(2);});});
The text was updated successfully, but these errors were encountered:
pimterry
pushed a commit
to httptoolkit/adbkit
that referenced
this issue
Dec 13, 2021
Hello,
I was wondering if you could give me some advice on how to capture a screenshot from the android emulator.
I am working with protractor and appium for connecting to the emulator. Here is the code which I have so far:
The text was updated successfully, but these errors were encountered: