|
List Info
Thread: Image Uploading Problem....
|
|
| Image Uploading Problem.... |

|
2006-12-29 07:19:30 |
Hi Everybody, I Want To Upload An Image On A Site...
The Html Code Of The Palce Of Giving Name & The Browse
Button Is Here:
[i]<INPUT ID=onetidIOFile TABINDEX=1 TYPE=FILE size=56
NAME="urn:schemas-microsoft-com:office:office#FileLeafR
ef" VALUE="" title="Name" />[/i]
As Its A Field Of Type "File", Not A "Text
Field", I Can't Put The Path, e.g c:abc.gif In This
Field By
[i]ie.text_field(:id, "onetidIOFile").value =
"c:abc.gif"
or
ie.text_field(:name,
"urn:schemas-microsoft-com:office:office#FileLeafRef&qu
ot;).set("c:abc.gif")[/i]
So How Do I Put This Path Directly In The Blank Place Of
Giving The File Name, Insteed Of Clicking On Browse &
Then Selecting It Manually...
& Then Of Course I'll Click On A Button, Here Named
"Save And Close"...
------------------------------------------------------------
---------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa
?threadID=5946&messageID=16641#16641
_______________________________________________
Wtr-general mailing list
Wtr-general rubyforge.org
htt
p://rubyforge.org/mailman/listinfo/wtr-general
|
|
| Image Uploading Problem.... |

|
2006-12-29 07:35:58 |
[i]ie.file_field(:name,
"urn:schemas-microsoft-com:office:office#FileLeafRef&qu
ot;).set("c:abc.gif")[i]
is not working... :(
------------------------------------------------------------
---------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa
?threadID=5946&messageID=16642#16642
_______________________________________________
Wtr-general mailing list
Wtr-general rubyforge.org
htt
p://rubyforge.org/mailman/listinfo/wtr-general
|
|
| Image Uploading Problem.... |

|
2006-12-29 09:08:09 |
|
This works for me
ie.file_field(:id, "onetidIOFile").set(39;c:abc.gif') ie.file_field(:name, "urn:schemas-microsoft-com:office:office#FileLeafRef").set('c:abc.gif';)
I guess that your problem is that c:abc.gif is in double qoutes ("c:abc.gif"). Use single quotes and it should work just fine ('c:abc.gif').
I would know more if you posted your error message instead of just "is not working". 
For more information see http://en.wikibooks.org/wiki/Ruby_Programming/Strings
-- Zeljko Filipin zeljkofilipin.com
|
| Image Uploading Problem.... |

|
2006-12-29 11:56:38 |
Ok, It Was Not The Double Quotes That Was Causing Problem
Its
The Space In The Name Of The Folder... It taking Path Like
"c"abc.gif" But Its Not Taking The Path like
'c:new folderabc.jpg', as it says can't find 'c:new'.
I Think The Space Between New & Folder Is Causing
Problem... I Also Tried... 'c:\new folder\abc.jpg' and
"c:\new folder\abc.jpg", but nothing worked...
So Whats The Solution Pls?
Also as you said ie.file_field(:id,
"onetidIOFile").set('c:abc.gif') is working fine,
but another black dos box is coming up and many lines are
passing through it very fast, i think it the way of
searching the file path, but its taking a long time, at
least 10 secs for a file... Is there any other way to do
it... Thanks For The Reply...
------------------------------------------------------------
---------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa
?threadID=5946&messageID=16647#16647
_______________________________________________
Wtr-general mailing list
Wtr-general rubyforge.org
htt
p://rubyforge.org/mailman/listinfo/wtr-general
|
|
| Image Uploading Problem.... |

|
2006-12-29 12:33:57 |
|
Hi,
I too face the same problem with Watir 1.4.1 while running the unit tests; if the installation directory contains a space in the folder name the upload simply doesn't work. I don't know if it is solved or not.
The only way is to remove the space from your folder name. Or try a path with no space.
Regards, Angrez
On 12/29/06, san < forum-watir-users openqa.org">forum-watir-users openqa.org> wrote:
Ok, It Was Not The Double Quotes That Was Causing Problem Its The Space In The Name Of The Folder... It taking Path Like "c"abc.gif" But Its Not Taking The Path like 'c:new folderabc.jpg', as it says can't find 'c:new'.
I Think The Space Between New & Folder Is Causing Problem... I Also Tried... 'c:\new folder\abc.jpg' and "c:\new folder\abc.jpg", but nothing worked... So Whats The Solution Pls?
Also as you said
ie.file_field(:id, "onetidIOFile").set(39;c:abc.gif') is working fine, but another black dos box is coming up and many lines are passing through it very fast, i think it the way of searching the file path, but its taking a long time, at least 10 secs for a file... Is there any other way to do it... Thanks For The Reply...
--------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5946&messageID=16647#16647
_______________________________________________ Wtr-general mailing list Wtr-general rubyforge.org">Wtr-general rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
|
| Image Uploading Problem.... |

|
2006-12-29 12:55:03 |
|
Hi san,
Can you try adding double quotes to the file path like this:
ie.file_field(:id, "onetidIOFile").set(""c:new folderabc.jpg"")
This should work.
Regards,
Angrez
On 12/29/06, san < forum-watir-users openqa.org">forum-watir-users openqa.org> wrote:
Ok, It Was Not The Double Quotes That Was Causing Problem Its The Space In The Name Of The Folder... It taking Path Like "c"abc.gif" But Its Not Taking The Path like 'c:new folderabc.jpg', as it says can't find 'c:new'.
I Think The Space Between New & Folder Is Causing Problem... I Also Tried... 'c:\new folder\abc.jpg' and "c:\new folder\abc.jpg", but nothing worked... So Whats The Solution Pls?
Also as you said
ie.file_field(:id, "onetidIOFile").set(39;c:abc.gif') is working fine, but another black dos box is coming up and many lines are passing through it very fast, i think it the way of searching the file path, but its taking a long time, at least 10 secs for a file... Is there any other way to do it... Thanks For The Reply...
--------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5946&messageID=16647#16647
_______________________________________________ Wtr-general mailing list Wtr-general rubyforge.org">Wtr-general rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
|
[1-6]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|