angularjs - Protractor File Upload with Saucelabs -


i'm testing angularjs project using protractor. have image file upload tests working , passing correctly on local mac machine. however, when run same test via saucelabs test fails.

saucelabs having problems finding file , opens dialog box can't find file. file within test solution , not in saucelabs. i've looked around on web answers haven't seen definitive answer resolve particular problem. below example of code using upload image file against application.

var path = require('path');  it('should upload file', function() {   var filetoupload = '../some/path/foo.txt',   absolutepath = path.resolve(__dirname, filetoupload);    $('input[type="file"]').sendkeys(absolutepath);       $('#uploadbutton').click(); }); 

any or suggestions on how above code work via saucelabs appreciated.

have tried like:

browser.driver.setfiledetector(new browser.driver.remote.filedetector);  

according the protractor issue it's either or it's not working (bug in selenium javascript bindings or protractor, or version mismatch).

in same github issue there's a workaround if main solution didn't work (tldr: file sharing).


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -