Automate testing how protractor closes the system pop-up box

In the

selenium+protractor automated test, when the attachment is uploaded, the pop-up box for the selected file uploaded by the attachment is opened, but there is no way to close the system pop-up box. How to solve this problem?

var path = require("path");
var absolutePath = path.resolve("C:\filename.txt");
element(by.css("input[type="file"]")).sendKeys(absolutePath);
Mar.11,2021

'input [type = "file"]', it should be possible to upload the sendKeys file path directly with selenium, without having to operate the Windows control.

in addition, the system pop-up box selenium cannot be operated, so you can try it with autoit. Have no contact with protractor

Menu