appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol
Apache License 2.0
1.2k stars 753 forks source link

pushFile method saves the file if a file with the same name already exists #2015

Open wazzeps opened 11 months ago

wazzeps commented 11 months ago

Description

pushFile(String remotePath, File file) method from PushesFiles interface saves the file if a file with the same name already exists on the device.

According to the XCUITest driver documentation, if the file with the same name already exists then it will be silently overridden.

Environment

Code To Reproduce Issue [ Good To Have ]

private final String filePath = "src/test/resources/files/photo.png";
private final String fileName = "photo.png";
try {
    File file = new File(filePath);
    ((PushesFiles) driver).pushFile(fileName, file);
}
ashwithpoojary98 commented 11 months ago

@wazzeps try it on the real device or other simulator