From michaelr at ibsglobalweb.com Thu Jun 1 02:43:58 2006
From: michaelr at ibsglobalweb.com (Michael Ruschena)
Date: Thu, 1 Jun 2006 16:43:58 +1000
Subject: [Wtr-general] How can I open and attach file using file_field
method?
Message-ID: <20060601064359.712D4430003@ibsglobalweb.com>
I encountered this problem yesterday, and unlike the mail archives, I have
an answer. I was getting exactly the behavior described below:
1) I would run a script using file_field.set
2) The script would get to the set method
3a) the choose file window would be invoked
3b) the file setFileDialog.rb would be opened in my ruby editor
3c) the script would sit there waiting for me to take manual action.
4) As soon as I take manual action to close the window, the script would
resume
Messing around with autoit, and the other suggestions didn't help at all.
The problem seems to be caused by associating *.rb files with an IDE. When
the set method attempts to start the thread that manipulates the Choose File
window, the operating system directs the script to the IDE rather than to
Ruby. As soon as I changed the association to the Ruby executable, the
file_field set method worked happily. (Well, not quite happily... The method
still doesn't like spaces in the path name, but that's an easy problem to
solve.)
I assume that Watir launching a new thread and telling the thread to execute
setFileDialog.rb, while what it needs to do is tell the thread to execute
setFileDialog.rb *with Ruby*. Either that or people getting this bug need to
change the file associations.
Michael Ruschena
________________________________
Cain, Mark
Thu, 12 Jan 2006 07:32:28 -0800
What behavior do you see? When my script runs I see a Dos window open with
focus (just like WinClicker), then the file chooser window open under the
Dos window. The Dos window scrolls through all the objects open and finally
gets to the File Chooser window, the document name (from $path) appears in
the file name field, the open button is clicked and that information is
transferred to the file_field text boxes. Finally the submit button is
clicked and the file is attached.
--Mark
________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of chaya shetty
Sent: Wednesday, January 11, 2006 10:11 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] How can I open and attach
fileusingfile_fieldmethod?
Hi,
I tried as said...Even then I am facing the same problem.
Code Used:
$path = "C:/Watir/file.txt"
$ie.file_field(:name,"srcfile").set($path)
$autoit = WIN32OLE.new("AutoItX3.Control")
$autoit.WinWait("Choose file", "Do you want to open or save this file?", 3)
$autoit.WinActivate("Choose file")
$autoit.WinWait("Choose file", "Look &in", 3)
$autoit.ControlSetText("Choose file", "", "Edit1", "#{$path}")
$autoit.ControlClick("Choose file", "Look &in", "&Open")
$ie.button(:name, "Open").click
The file field highlights(yellow)and opens choose file dialog along with
another ruby file with contents:
#
# setFileDialog.rb
#
#
# This file contains the file dialog when it runs as a separate process
$LOAD_PATH <&! lt; File.expand_path(File.join(File.dirname(__FILE__), '..'))
puts $LOAD_PATH
require 'watir/winClicker'
filepath = "invalid path passed to setFileDialog.rb"
filepath = ARGV[0] unless ARGV[0] == nil
clicker= WinClicker.new
clicker.setFileRequesterFileName(filepath)
clicker = nil
Then it waits for me to manually select the file and attach.
I have ensured that the path is correct and there is a text file viz. file
in the Watir folder.
Thanks,
Chaya
"Cain, Mark" <[EMAIL PROTECTED]> wrote:
Replace all your $autoit lines with this:
$autoit = WIN32OLE.new("AutoItX3.Control")
$autoit.WinWait("Choose file", "Do you want to open or save this
file?", 3)
$autoit.WinActivate("Choose file")
$autoit.WinWait("Choose file", "Look &in", 3)
$autoit.ControlSetText("Choose file", "", "Edit1", "#{$path}")
$autoit.ControlClick("Choose file", "Look &in", "&Open")
I don't know if it will make a difference but my script needed the
WinWait's left in to work right. Also, it took a little time for autoit to
find the window so don't get impatient.
Hope this helps,
--Mark
________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of chaya shetty
Sent: Thursday, January 05, 2006 9:27 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] How can I open and attach file
usingfile_fieldmethod?
Hi,
There is only one file field in the page and hence I tried with
path = "C\:Watir\Text.doc"
ie.file_field(:index,1).set(#{path})
$autoit = WIN32OLE.new("AutoItX3.Control")
$autoit.WinActivate("Choose file")
$autoit.ControlSetText("Choose file", "", "Edit1", "#{path}")
$autoit.ControlClick("Choose file", "Look &in", "&Open")
$ie.button(:name, "Submit").click
B! ut still the same behaviour was seen.
The file field was accessed and the "Choose File" window opened and
waited till I manually selected the file.
Thanks
Chaya
"Cain, Mark" <[EMAIL PROTECTED]> wrote:
Yes, the problem is (:value, 'Value') in this line:
ie.file_field(:value,'Value').set(#{path})
! The file_field supports these attributes: :id, :name,
:index. Do a view source and find out what the attribute values for your
tag. If for some reason your developers were lazy and
didn't give the tag an id or name attribute, use index. If there are more
than one tag on the page the indexing starts top-most
down with 1 and increments from there.
Here is the usage portion for file_field from Watir.rb:
# This is the main me! thod for accessing a file
field. Usually an HTML tag.
# * how - symbol - how we access the field ,
:index, :id, :name etc
# * what - string, int or re , what we are
looking for,
#
# returns a FileField object
#
# Typical Usage
#
# ie.file_field(:id, 'up_1')
# access the file upload field with an ID of up_1
# ie.file_field(:name, 'upload') #
access the file upload field with a name of upload
# ie.file_field(:index, 2)
# access the second file upload on the page ( 1 based, so the first field is
accessed with :index,1)
Hope this helps,
--Mark
________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL
PROTECTED] On Behalf Of chaya shetty
Sent: Thursday, January 05, 2006 4:45 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] How can I open and attach file
using file_fieldmethod?
Hi,
I tried with
path = "C\:Watir\Text.doc"
ie.file_field(:value,'Value').set(#{path})
$autoit = WIN32OLE.new("AutoItX3.Control")
$autoit.WinActivate("Choose file")
$autoit.ControlSetText("Choose file", "", "Edit1",
"#{path}")
$autoit.ControlClick("Choose file", "Look &in", "&Open")
$ie.button(:name, "Submit").click
But the same behaviour persists.
i.e. the "Choose File" window opens and waits till you
manually select the file.
Can't ie.file_field(:value,'Value').set(#{path})
automatically set the path?
Thanks
Chaya
--Mark
Amitha Shetty <[EMAIL PROTECTED]> wrote:
Hi,
How can I open and attach file using file_field
method?
when I try,
ie.file_field(:id,'uploaded_file').set('C:\file.txt')
I get "choose file"-window open .It waits for me, to
choose a file and
click "open" or whatever the button is called) ,
after that it
continues normally, by submitting the file_field
content. Why doesn't he choose a file by himself?How do I handle this?
I have ensured that there is no space in the path
and the file exists in C: )
I get the same error when I run filefield_test in
Unittests in watir folder.
Thanks,
Amitha
Send instant messages to your online friends
http://in.messenger.yahoo.com
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Send instant messages to your online friends
http://in.messenger.yahoo.com
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Send instant messages to your online friends
http://in.messenger.yahoo.com
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From zeljko.filipin at gmail.com Thu Jun 1 03:44:39 2006
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Thu, 1 Jun 2006 09:44:39 +0200
Subject: [Wtr-general] How can I open and attach file using file_field
method?
In-Reply-To: <20060601064359.712D4430003@ibsglobalweb.com>
References: <20060601064359.712D4430003@ibsglobalweb.com>
Message-ID:
If you want it fixed, enter a new case at Jira (
http://jira.openqa.org/browse/WTR), so it would not be forgotten.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060601/0a1957c5/attachment.html
From Adrian.Rutter at tnt.com Thu Jun 1 09:55:13 2006
From: Adrian.Rutter at tnt.com (Adrian Rutter)
Date: Thu, 1 Jun 2006 14:55:13 +0100
Subject: [Wtr-general] Determine HTML property
Message-ID:
Hi,
I have an HTML field that once saved becomes read-only [readonly="true"].
Apart from doing a regex on the source how can I determine this property?
Cheers
Aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
From zeljko.filipin at gmail.com Thu Jun 1 10:09:00 2006
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Thu, 1 Jun 2006 16:09:00 +0200
Subject: [Wtr-general] Determine HTML property
In-Reply-To:
References:
Message-ID:
ie.radio(:id, "id").readonly?
On 6/1/06, Adrian Rutter wrote:
>
>
> Hi,
>
> I have an HTML field that once saved becomes read-only [readonly="true"].
> Apart from doing a regex on the source how can I determine this property?
>
> Cheers
>
> Aidy
>
>
>
>
> ---------------------------------------------------------------------------------------------------------------
> This message and any attachment are confidential and may be privileged or
> otherwise protected from disclosure.
> If you are not the intended recipient, please telephone or email the
> sender and delete this message and any attachment from your system.
> If you are not the intended recipient you must not copy this message or
> attachment or disclose the contents to any other person.
>
> ---------------------------------------------------------------------------------------------------------------
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
http://www.testingreflections.com/blog/3071
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060601/74ac64da/attachment.html
From bret at pettichord.com Thu Jun 1 10:22:41 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 1 Jun 2006 09:22:41 -0500
Subject: [Wtr-general] How can I open and attach file using file_field
method?
In-Reply-To: <20060601064359.712D4430003@ibsglobalweb.com>
References: <20060601064359.712D4430003@ibsglobalweb.com>
Message-ID:
Thanks for solving this problem.
Now that we have a click_no_wait method, we shouldn't have to resort to
external *.rb files in the first place.
Bret
On 6/1/06, Michael Ruschena wrote:
>
> I encountered this problem yesterday, and unlike the mail archives, I have
> an answer. I was getting exactly the behavior described below:
> 1) I would run a script using file_field.set
> 2) The script would get to the set method
> 3a) the choose file window would be invoked
> 3b) the file setFileDialog.rb would be opened in my ruby editor
> 3c) the script would sit there waiting for me to take manual action.
> 4) As soon as I take manual action to close the window, the script would
> resume
> Messing around with autoit, and the other suggestions didn't help at all.
>
> The problem seems to be caused by associating *.rb files with an IDE. When
> the set method attempts to start the thread that manipulates the Choose
> File
> window, the operating system directs the script to the IDE rather than to
> Ruby. As soon as I changed the association to the Ruby executable, the
> file_field set method worked happily. (Well, not quite happily... The
> method
> still doesn't like spaces in the path name, but that's an easy problem to
> solve.)
>
> I assume that Watir launching a new thread and telling the thread to
> execute
> setFileDialog.rb, while what it needs to do is tell the thread to execute
> setFileDialog.rb *with Ruby*. Either that or people getting this bug need
> to
> change the file associations.
>
> Michael Ruschena
>
> ________________________________
>
> Cain, Mark
> Thu, 12 Jan 2006 07:32:28 -0800
>
> What behavior do you see? When my script runs I see a Dos window open
> with
> focus (just like WinClicker), then the file chooser window open under the
> Dos window. The Dos window scrolls through all the objects open and
> finally
> gets to the File Chooser window, the document name (from $path) appears in
> the file name field, the open button is clicked and that information is
> transferred to the file_field text boxes. Finally the submit button is
> clicked and the file is attached.
>
>
>
> --Mark
>
>
>
> ________________________________
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of chaya
> shetty
> Sent: Wednesday, January 11, 2006 10:11 PM
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] How can I open and attach
> fileusingfile_fieldmethod?
>
>
>
> Hi,
>
> I tried as said...Even then I am facing the same problem.
>
> Code Used:
>
> $path = "C:/Watir/file.txt"
>
> $ie.file_field(:name,"srcfile").set($path)
> $autoit = WIN32OLE.new("AutoItX3.Control")
>
> $autoit.WinWait("Choose file", "Do you want to open or save this file?",
> 3)
>
> $autoit.WinActivate("Choose file")
>
> $autoit.WinWait("Choose file", "Look &in", 3)
>
> $autoit.ControlSetText("Choose file", "", "Edit1", "#{$path}")
>
> $autoit.ControlClick("Choose file", "Look &in", "&Open")
>
> $ie.button(:name, "Open").click
> The file field highlights(yellow)and opens choose file dialog along
> with
> another ruby file with contents:
>
> #
> # setFileDialog.rb
> #
> #
> # This file contains the file dialog when it runs as a separate process
>
> $LOAD_PATH <&! lt; File.expand_path(File.join(File.dirname(__FILE__),
> '..'))
> puts $LOAD_PATH
> require 'watir/winClicker'
>
> filepath = "invalid path passed to setFileDialog.rb"
> filepath = ARGV[0] unless ARGV[0] == nil
>
> clicker= WinClicker.new
> clicker.setFileRequesterFileName(filepath)
> clicker = nil
>
>
>
>
> Then it waits for me to manually select the file and attach.
>
> I have ensured that the path is correct and there is a text file viz. file
> in the Watir folder.
>
>
>
> Thanks,
>
> Chaya
>
>
> "Cain, Mark" <[EMAIL PROTECTED]> wrote:
>
> Replace all your $autoit lines with this:
>
>
>
> $autoit = WIN32OLE.new("AutoItX3.Control")
>
> $autoit.WinWait("Choose file", "Do you want to open or save
> this
> file?", 3)
>
> $autoit.WinActivate("Choose file")
>
> $autoit.WinWait("Choose file", "Look &in", 3)
>
> $autoit.ControlSetText("Choose file", "", "Edit1", "#{$path}")
>
> $autoit.ControlClick("Choose file", "Look &in", "&Open")
>
>
>
> I don't know if it will make a difference but my script needed the
> WinWait's left in to work right. Also, it took a little time for autoit
> to
> find the window so don't get impatient.
>
>
>
> Hope this helps,
>
>
>
> --Mark
>
>
>
> ________________________________
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf
> Of chaya shetty
> Sent: Thursday, January 05, 2006 9:27 PM
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] How can I open and attach file
> usingfile_fieldmethod?
>
>
>
> Hi,
>
> There is only one file field in the page and hence I tried with
>
> path = "C\:Watir\Text.doc"
>
>
> ie.file_field(:index,1).set(#{path})
>
>
> $autoit = WIN32OLE.new("AutoItX3.Control")
>
> $autoit.WinActivate("Choose file")
>
> $autoit.ControlSetText("Choose file", "", "Edit1", "#{path}")
>
> $autoit.ControlClick("Choose file", "Look &in", "&Open")
>
> $ie.button(:name, "Submit").click
>
>
>
> B! ut still the same behaviour was seen.
>
> The file field was accessed and the "Choose File" window opened
> and
> waited till I manually selected the file.
>
>
>
> Thanks
>
> Chaya
>
>
>
>
>
>
> "Cain, Mark" <[EMAIL PROTECTED]> wrote:
>
> Yes, the problem is (:value, 'Value') in this line:
>
> ie.file_field(:value,'Value').set(#{path})
>
>
>
> ! The file_field supports these attributes: :id, :name,
> :index. Do a view source and find out what the attribute values for your
> tag. If for some reason your developers were lazy and
> didn't give the tag an id or name attribute, use index. If there are more
> than one tag on the page the indexing starts top-most
> down with 1 and increments from there.
>
>
>
> Here is the usage portion for file_field from Watir.rb:
>
> # This is the main me! thod for accessing a file
> field. Usually an HTML tag.
>
> # * how - symbol - how we access the field ,
> :index, :id, :name etc
>
> # * what - string, int or re , what we are
> looking for,
>
> #
>
> # returns a FileField object
>
> #
>
> # Typical Usage
>
> #
>
> # ie.file_field(:id, 'up_1')
> # access the file upload field with an ID of up_1
>
> # ie.file_field(:name, 'upload')
> #
> access the file upload field with a name of upload
>
> # ie.file_field(:index, 2)
> # access the second file upload on the page ( 1 based, so the first field
> is
> accessed with :index,1)
>
>
>
> Hope this helps,
>
>
>
> --Mark
>
>
>
> ________________________________
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL
> PROTECTED] On Behalf Of chaya shetty
> Sent: Thursday, January 05, 2006 4:45 AM
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] How can I open and attach file
> using file_fieldmethod?
>
>
>
> Hi,
>
> I tried with
> path = "C\:Watir\Text.doc"
>
>
> ie.file_field(:value,'Value').set(#{path})
>
>
> $autoit = WIN32OLE.new("AutoItX3.Control")
>
> $autoit.WinActivate("Choose file")
>
> $autoit.ControlSetText("Choose file", "", "Edit1",
> "#{path}")
>
> $autoit.ControlClick("Choose file", "Look &in",
> "&Open")
>
>
> $ie.button(:name, "Submit").click
>
>
>
> But the same behaviour persists.
>
> i.e. the "Choose File" window opens and waits till you
> manually select the file.
>
>
>
> Can't ie.file_field(:value,'Value').set(#{path})
> automatically set the path?
>
>
>
> Thanks
>
> Chaya
>
>
>
>
>
>
>
>
>
> --Mark
>
>
> Amitha Shetty <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> How can I open and attach file using file_field
> method?
>
> when I try,
>
>
> ie.file_field(:id,'uploaded_file').set('C:\file.txt')
>
> I get "choose file"-window open .It waits for me,
> to
> choose a file and
> click "open" or whatever the button is called) ,
> after that it
> continues normally, by submitting the file_field
> content. Why doesn't he choose a file by himself?How do I handle this?
>
> I have ensured that there is no space in the path
> and the file exists in C: )
> I get the same error when I run filefield_test in
> Unittests in watir folder.
>
>
>
> Thanks,
>
> Amitha
>
>
>
> Send instant messages to your online friends
> http://in.messenger.yahoo.com
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
> Send instant messages to your online friends
> http://in.messenger.yahoo.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
> Send instant messages to your online friends
> http://in.messenger.yahoo.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060601/0ba4cd04/attachment.html
From psyonic at gmail.com Thu Jun 1 11:25:14 2006
From: psyonic at gmail.com (Tyler Prete)
Date: Thu, 1 Jun 2006 09:25:14 -0600
Subject: [Wtr-general] Methods that can be used within a frame?
In-Reply-To:
References:
<447DE6B1.90209@tower-mt.com>
Message-ID:
Well I may not even have to deal with it anymore, but how would I change
this manually? I do not have control over the HTML in the page, I am only
interacting with it via Watir.
On 5/31/06, Bret Pettichord wrote:
>
> On 5/31/06, Tyler Prete wrote:
>
> > Thank you for the help David. It looks like for now I will just have to
> > try and work-around the frame issue... probably won't be too bad. I would
> > post some actual code but I am writing this for use with a company intranet,
> > so it wouldn't do much good anyway.
> >
>
> What frame issue? If you want to change the page frames that a main page
> loads, the way to do that is to change the main page itself. You do all of
> this in HTML. I'm not sure i understand what you are trying to do. Are you
> trying to do something that you can do manually?
>
> Bret
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060601/60581c80/attachment.html
From dara.lillis at kiodex.com Thu Jun 1 11:43:06 2006
From: dara.lillis at kiodex.com (Lillis, Dara)
Date: Thu, 1 Jun 2006 08:43:06 -0700
Subject: [Wtr-general] RPC Server unavailable
Message-ID: <35AF30C7B5EBFA4DBC854B5B9DF66B0E959F2D@ehost011-27.exch011.intermedia.net>
Yesterday I spent a bunch of time getting my watir and ruby versions
synchronized on the various machines I use for developing and running
tests. I am now using:
Ruby 1.8.2-15 Stable Release
watir-1.5.1.1017
Is this the right (or at least a "good") Ruby version to use with the
latest Watir? I scoured watir.com and the wiki for recommendations on
this but couldn't find any.
Anway, I am now receiving the "RPC Server unavailable" message
intermittently when running tests. I found an old discussion on this
(http://rubyforge.org/pipermail/wtr-general/2006-January/004634.html)
where Bret recommends:
"1. Add time delays between the ie.close and ie.new or ie.start. This
will
give a chance for the ie.close to really close.
2. Don't close IE -- just reuse the existing client between tests.
3. Create an additional IE. As long as this lives, the IE server will
continue to live and you can close and create IE windows without worry.
I presume you are using Watir 1.4. The watir library in HEAD uses option
3
to avoid this problem."
Am I seeing a different problem since I'm using watir-1.5? Or is it the
same thing? If it is the same thing, how do I do #3?
Dara Lillis * Software Testing * SunGard * Kiodex * 628 Broadway, Suite
501, New York, NY 10012
Tel 646-437-2627 * Fax 646-437-3910 * http://www.sungard.com/Kiodex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060601/57a2dccc/attachment.html
From yawl.12545861 at bloglines.com Thu Jun 1 11:54:15 2006
From: yawl.12545861 at bloglines.com (yawl.12545861 at bloglines.com)
Date: 1 Jun 2006 15:54:15 -0000
Subject: [Wtr-general] RPC Server unavailable
Message-ID: <1149177255.1940079767.24408.sendItem@bloglines.com>
> Anway, I am now receiving the "RPC Server unavailable" message
> intermittently
when running tests. I found an old discussion on this
> (http://rubyforge.org/pipermail/wtr-general/2006-January/004634.html)
> where Bret recommends:
>
I am not sure if this will help, but I have
seen several people get "RPC Server unavailable" error because they disabled
"DCOM Server Process Launcher" service.
Please check out my blog for more
information:
http://seclib.blogspot.com/2005/10/do-not-disable-dcom-server-process.html
From bret at pettichord.com Thu Jun 1 12:09:39 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 1 Jun 2006 11:09:39 -0500
Subject: [Wtr-general] RPC Server unavailable
In-Reply-To: <35AF30C7B5EBFA4DBC854B5B9DF66B0E959F2D@ehost011-27.exch011.intermedia.net>
References: <35AF30C7B5EBFA4DBC854B5B9DF66B0E959F2D@ehost011-27.exch011.intermedia.net>
Message-ID:
On 6/1/06, Lillis, Dara wrote:
>
> Yesterday I spent a bunch of time getting my watir and ruby versions
> synchronized on the various machines I use for developing and running tests.
> I am now using:
>
> Ruby 1.8.2-15 Stable Release
> watir-1.5.1.1017
>
> Is this the right (or at least a "good") Ruby version to use with the
> latest Watir? I scoured watir.com and the wiki for recommendations on this
> but couldn't find any.
>
That should be fine.
Anway, I am now receiving the "RPC Server unavailable" message
intermittently when running tests. I found an old discussion on this (*
http://rubyforge.org/pipermail/wtr-general/2006-January/004634.html*)
where Bret recommends:
"1. Add time delays between the ie.close and ie.new or ie.start. This will
> give a chance for the ie.close to really close.
> 2. Don't close IE -- just reuse the existing client between tests.
> 3. Create an additional IE. As long as this lives, the IE server will
> continue to live and you can close and create IE windows without worry.
>
> I presume you are using Watir 1.4. The watir library in HEAD uses option 3
> to avoid this problem."
>
> Am I seeing a different problem since I'm using watir-1.5? Or is it the
> same thing? If it is the same thing, how do I do #3?
>
Good question.
Option 3 was causing problems when it was enabled by default, so i turned it
off. You can turn it back on with
Watir::IE.persist_ole_connection = true
This is an as yet undocumented feature.
Please let us know whether this helps. Or whether it creates other problems.
I wish i remember the exact problems that lead me to turn it off.
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060601/c9430b20/attachment.html
From EDanilova at NYBOT.com Thu Jun 1 12:33:44 2006
From: EDanilova at NYBOT.com (Danilova, Elza)
Date: Thu, 1 Jun 2006 12:33:44 -0400
Subject: [Wtr-general] How to create a script for calendar function?
Message-ID: <3111B45C4B9CE54C86294493C8C7E197025DDDDF@mailserver>
Hi,
Using the following:
ie.link(:url,"javascript:show_calendar'resultsearch.gDate')").click
ie2=Watir::IE.attach(:title, "Calendar") we were able to open the
calendar icon, but could not go any further, because there is no object
name on the calendar.html page:
-----------Objects in page -------------
name= id=
name= id=
name= id=
name= id=
name= id=
Calendar html:
html>
CalendarJune 2006
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Attebery, Bill
Sent: Wednesday, May 31, 2006 6:10 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] How to create a script for calendar function?
Not sure if all calendar functions are created equal -- the one used at
my site pops up another IE window -- I can attach to it and then drive
it like always.
ie.image(:id, 'my_calendar_icon').click
@ie2=IE.attach(:title, /Select Date/)
Now @ie2 is another browser instance with select_lists, links, buttons,
etc. available to control through regular watir statements.
@ie2.select_list(:name, 'cboMonth').select('Jun')
@ie2.select_list(:name, 'cboYear').select('2006')
@ie2.link(:text, '15').click
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of John Fitisoff
Sent: Wednesday, May 31, 2006 3:28 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] How to create a script for calendar function?
If you aren't trying to do anything complicated - and the calendar
control responds to keyboard input - you might want to try using the
send_keys method to set the calendar control:
ie.image(:id, "my_calendar_icon").click
ie.send_keys("{UP}")
ie.send_keys("{LEFT}")
ie.send_keys("{ENTER}")
The drawback is that this approach may not let you exercise all of the
calendar control's functionality. But if you're just worried about
setting a date it's probably enough to get you past the control without
worrying about the Javascript.
--- "Danilova, Elza" wrote:
> Using WATIR I am having problem to create a document that includes the
> calendar function.
>
> How can I drive a java script to execute the calendar function, where
> the text field can not be populated with the date and it's only allow
> you to select a date by clicking on the calendar icon?
>
> Thank you,
>
> Elza
>
>
> "This e-mail and any attachments may contain confidential and
> privileged information. Any dissemination or use of the information by
> a person other than the intended recipient is unauthorized and may be
> illegal. If you are not the intended recipient, please notify the
> sender immediately by return e-mail, delete this e-mail and destroy
> any copies. Although this e-mail and any attachments are believed to
> be free of any virus or other defect that might affect any computer
> system into which it is received and opened, it is the responsibility
> of the recipient to ensure that it is virus free and no responsibility
> is accepted by the Board of Trade of the City of New York, Inc. or the
> New York Clearing Corporation for any loss or damage arising in any
> way from its use. Thank you."
>
>
>
> > _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com _______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
The content contained in this electronic message is not intended to
constitute formation of a contract binding TWTC. TWTC will be
contractually bound only upon execution, by an authorized officer, of a
contract including agreed terms and conditions or by express application
of its tariffs.
This message is intended only for the use of the individual or entity to
which it is addressed. If the reader of this message is not the intended
recipient, or the employee or agent responsible for delivering the
message to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this message is strictly
prohibited. If you have received this communication in error, please
notify us immediately by replying to the sender of this E-Mail or by
telephone. _______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
The content contained in this electronic message is not intended to
constitute formation of a contract binding TWTC. TWTC will be
contractually bound only upon execution, by an authorized officer, of
a contract including agreed terms and conditions or by express
application of its tariffs.
This message is intended only for the use of the individual or entity
to which it is addressed. If the reader of this message is not the
intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the sender of this E-Mail or by telephone.
From Bill.Attebery at twtelecom.com Thu Jun 1 18:12:32 2006
From: Bill.Attebery at twtelecom.com (Attebery, Bill)
Date: Thu, 1 Jun 2006 16:12:32 -0600
Subject: [Wtr-general] How to create a script for calendar function?
Message-ID:
Oops -- typo
2nd example should be
ie2.link(:index, 7).click should set the date to '2006-06-02'
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Attebery, Bill
Sent: Thursday, June 01, 2006 4:06 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] How to create a script for calendar function?
Try
ie2.show_links to see all the links in the page and ie2.show_tables to
see all the tables in the page
Looking at the code snippet --
ie2.link(:text, '2').click should set the date to '2006-06-02'
ie2.link(:id, ).click should set the date to '2006-06-02'
Ie2.table(:index, 2)[2][6].click should set the date to '2006-06-02'
ie2.table(:index, )[2][6].fireEvent('onclick') should also set the date
to '2006-06-02'
Also ie2.link(:text, '<<').click should move the year back
ie2.link(:text, '>>').click should move the year forward
ie2.link(:text, '>').click should move the month forward
ie2.link(:text, 'Print').click should print (I assume)
etc.
Likewise ie2.table(:index, 1)[1][1].click will move the year back
ie2.table(:index, 1)[1][1].fireEvent will move the year back
etc.
I recommend identifying the links by :text (simple to code and read) --
but there are many other ways to do the same thing.
Hope this helps.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Danilova, Elza
Sent: Thursday, June 01, 2006 10:34 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] How to create a script for calendar function?
Hi,
Using the following:
ie.link(:url,"javascript:show_calendar'resultsearch.gDate')").click
ie2=Watir::IE.attach(:title, "Calendar") we were able to open the
calendar icon, but could not go any further, because there is no object
name on the calendar.html page:
-----------Objects in page -------------
name= id=
name= id=
name= id=
name= id=
name= id=
Calendar html:
html>
CalendarJune 2006