java-client icon indicating copy to clipboard operation
java-client copied to clipboard

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

Open wazzeps opened this issue 1 year ago • 1 comments

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

  • Java client 8.3.0
  • Appium server 2.0.1
  • XCUITest driver 4.35.0
  • Simulator iOS 16.4

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);
}

wazzeps avatar Sep 13 '23 18:09 wazzeps

@wazzeps try it on the real device or other simulator

ashwithpoojary98 avatar Sep 17 '23 01:09 ashwithpoojary98