当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Protractor incorrect file upload linux

问题描述:

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!

分享给朋友:
您可能感兴趣的文章:
随机阅读: