问题描述:

I have problem with upload image in protractor.

 absolutePath = path.resolve(__dirname, process.env.avatar_picture_path);

browser.sleep(1000);

$('input[type="file"]').sendKeys(absolutePath);

browser.sleep(2000);

expect(element(by.id('submit-avatar-picture')).isDisplayed()).toBeTruthy();

element(by.id('submit-avatar-picture')).click();

For windows this code is working, but on testing server (linux), protractor sending only file with file name and and file type.

Thank You for help!

相关阅读:
Top