Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6470733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:08:40+00:00 2026-05-25T06:08:40+00:00

Using this code I cannot get a file to upload correctly to the website.

  • 0

Using this code I cannot get a file to upload correctly to the website.

browser.form(:index, 2).file_field(:name, "filedata").set(""+folderName+"/iTunesArtwork")

Once the code is run it shows that it’s uploading by displaying a spinning wheel but it never actually uploads and the wheel just keeps spinning. If I upload it on my own though it uploads fine.

Here’s a link for the html:
http://f.cl.ly/items/3v3o1p1g0t2S1q3q3Q1h/Text%202011.09.03%2011:40:06%20PM.html

As you can see the html is in a form tag. If I try to access the file_field without going through the form first it will give me an error saying element can’t be interacted with because it’s not visible. Anyone have a clue what’s going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:08:40+00:00Added an answer on May 25, 2026 at 6:08 am

    Your local file you are uploading mustn’t exist locally.

    I have uploaded your HTML to: http://dl.dropbox.com/u/18859962/uploader.html

    I tried this:

    ruby-1.9.2-p290 :001 > require "watir-webdriver"
     => true 
    ruby-1.9.2-p290 :002 > b = Watir::Browser.start "http://dl.dropbox.com/u/18859962/uploader.html"
     => #<Watir::Browser:0x..fdea53ebfe3940b9a url="http://dl.dropbox.com/u/18859962/uploader.html" title="untitled"> 
    ruby-1.9.2-p290 :003 > b.file_field.exists?
     => true 
    ruby-1.9.2-p290 :004 > local_file = "/users/me/ie.html"
     => "/users/me/ie.html" 
    ruby-1.9.2-p290 :005 > File.exists? local_file
     => true 
    ruby-1.9.2-p290 :006 > raise "error" unless File.exists? local_file
     => nil 
    ruby-1.9.2-p290 :007 > b.file_field.set local_file
     => "/users/me/ie.html
    

    Please run your script against this hosted html file and report back.

    Also, you should raise an exception if the local file doesn’t exist, so that eliminates that error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using following code but cannot return data from MySQL. This is the output:
I'm using this code, and I get the stack trace that is listed below.
I've got this wired problem, I cannot get the content from the file and
I'm trying to use mysql_real_escape_string() to secure a log in form. Using this code:
I cannot get this simple piece of code to compile without including the TestClass.cpp
I'm trying to create a website in IIS using this code (from another site
I'm lost here. I create files using this (stripped) code : File dir =
I am writing to the text file some data. I am using this code:
Using this code to zip a folder and it works perfect on small files
Im using this code for mysql connection $con = mysql_connect(localhost:/var/lib/mysql/mysql.sock, abc , xyz); if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.