INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Selenium IDE file upload automation

Selenium IDE file upload automation

(OP)
I am trying to write a script using the IDE
I want to upload all the files in a folder to a website one at a time
I am trying to set it up so i only have to run this script each time i have to upload a batch

/Users/me/Desktop/files
Has a bunch of files in it

Basically I need an array with each element in it referring to the absolute file path of each of the files contained in
/Users/me/Desktop/files
Then it opens the webpage and uploads the value of the next element in the array
Hits a submit button
Then repeats the process until all the elements/files have been handled

This is what i have so far
it dose it once using a specific file

CODE

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://www.thesite.com" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
    <td>open</td>
    <td>/upload.php</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>name=file</td>
    <td>/Users/me/Desktop/files/f1</td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=input.btn</td>
    <td></td>
</tr>

</tbody></table>
</body>
</html> 

Im not sure if this is really what selenium was made for but it sounds like it could do what im looking for
I know a bit about programing mostly java but im out of my depth here, any help would be appreciated. Even other avenues to look into.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close