I want to the which can be in format of Png/Jpg/Apk/PPT/Pdf/Word to me web Service . Currently i am automating through and Maven with TestNG Framework.

Issue Facing-I want a code for uploading all files directly from my which is inside the project but outside SRS in eclipse.But wile doing so i am getting an error of Null pointer exception or some time file not found error.

Below is the code which i am using to upload

[

AddNewAppPage lPO = new AddNewAppPage(driver);
ClassLoader classLoader = getClass().getClassLoader();
File file = new File(classLoader.getResource(“./Drivers/e-Pragati Developer Portal.pdf”).getFile());
Thread.sleep(3000);
lPO.getPresentationFile().sendKeys(file.toString());

]1

Actually i don’t want to give of image or file which is to be upload from my i directly want to upload from the resource folder in eclipse project
Kindly let me know how to do it.Check the image in link provided.

Resorce Folder-Driver

Folder structure



Source link https://sqa.stackexchange.com/questions/35435/i-want-to-upload-file-img-ppt-apk-from-the-project-folder-but-not-by--xp

LEAVE A REPLY

Please enter your comment!
Please enter your name here