Protractor Running exe with child_process -


i'm trying simulate upload file protractor know protractor can't interact os window , created exe file (with autoit), takes focus , insert file . when i'm testing manually working ok . when try write in protractor error

this protractor code ( using child_process ) -- see pic

code

here error massage

error

tried using : no luck!! upload metod2

you don't need autoit upload files. send full absolute path file want upload upload input. if running tests selenium grid need use filedetector send file node test running:

var filedetector = require('selenium-webdriver/remote/index.js').filedetector; browser.setfiledetector(new filedetector());  var path = require('path');  var filetoupload = '../yourfile.txt', absolutepath = path.resolve(__dirname, filetoupload); $('hiddenfileuploadinput').sendkeys(absolutepath) 

here question has answers might help: how upload file in angularjs e2e protractor testing


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -