Skip to content

File pushed to mobile device using pushFile method cannot be viewed in device/windows BUT these file get's listed using adb #218

@amitjaincoer191

Description

@amitjaincoer191

I pushed a image and a text file using pushFile method of java client on my sdcard location
/storage/sdcard1/User

But I cannot see the pushed files

When I open the above directory into my mobile using fileExplorer app

When I connect my mobile to windows machine and I navigate to above directory

I cannot only view the listing of my file using adb shell cd /storage/sdcard1/User

shell@condor_umtsds:/storage/sdcard1/User $ ll
-rwxrwx--- root sdcard_r 54960 2015-07-17 18:53 img1.jpg
-rwxrwx--- root sdcard_r 334126 2015-04-18 16:45 ticket.png

My Code :
@test
public void pushImageFileFromMobileTest() throws IOException {
File fi = new File("C:\eclipse\img1.jpg");
byte[] fileContent = Files.readAllBytes(fi.toPath());
_driver.pushFile("/storage/sdcard1/User/img1.jpg", fileContent);
}

Similarly happens with text file ....

I am not sure but what I feel issue may be is that files are not decoded to Base64 before copying to device....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions