Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
193 views
by Contributing Tester (14 points)
retagged by
I have a list of user id's and a folder of corresponding excel sheets that need to be uploaded onto a website.

Is it possible to write some type of java code to search for the correct corresponding excel sheet, upload it to the website and then do the same to the rest of my list of IDs?

I'm assuming I'll have to do something with AutoIT maybe?

1 Answer

0 like 0 dislike
by Expert (572 points)
selected by
 
Best answer

This is pretty simple.

You do not need to use AutoIT for this.

So, I assume that you have list of ID, that will map to a folder and those folders has list of excel files that you need to upload to a website.

You can divide this into two parts.

Part 1.) Search Excel file

Part 2.) Upload the file to a website.

Part 1:

First you can write a program to list folders. Say, you have got 10 IDs (this can be dynamic as well). So, you have go 10 folders mapped.

You can store this list of folders into List<String> variable.

Now, you can iterate through List<String> and get a list of excel file from each folder and store it into List<String> variable.

If you want to map retrieved excel file with the ID, you can use HashMap<String,String> as well.

So, you have got list of excel files mapped to the ID.

Part 2:

You can use framework like Selenium(https://www.seleniumhq.org/) to automate the file upload to a website.

Hope that is clear.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...