From forum-watir-users at openqa.org Fri Dec 1 00:01:39 2006
From: forum-watir-users at openqa.org (Dhamodharan)
Date: Thu, 30 Nov 2006 23:01:39 CST
Subject: [Wtr-general] How can i upload an image when i click browse
button(input type=File)
Message-ID: <47520692.1164949329965.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Hi friends,
I'm Very new to this watir . i want to know how to upload a file in watir.
Please send me some examples...
hi yaar.. I'm Damu from India .. Working as aQA. Currently i'm working in WATIR tool. I'm New to this tool .
Hi i want to know how to upload a file in Watir..
I wiill send u the HTML tag
i want to know
how to open when i click the browse button?
1.A popup window will open.
2.In that one we will upload the image path .
3. and than click open
Please mail me as soon as possible..
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5557&messageID=15482#15482
From forum-watir-users at openqa.org Fri Dec 1 01:12:30 2006
From: forum-watir-users at openqa.org (Dhamodharan)
Date: Fri, 01 Dec 2006 00:12:30 CST
Subject: [Wtr-general] How can i upload an image when i click browse
button(input type=File)
In-Reply-To: <47520692.1164949329965.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <44441341.1164953580162.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Hi friends no i have uploaded ..
but i'm getting this error
The above file is in valid
ie.fileField(:name, "avatar").set("damu"); :- this was the script i have written
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5557&messageID=15483#15483
From angrez at gmail.com Fri Dec 1 01:19:02 2006
From: angrez at gmail.com (Angrez Singh)
Date: Fri, 1 Dec 2006 11:49:02 +0530
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To: <51009756.1164916267478.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <51009756.1164916267478.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
Hi Nathan,
You can get the code for Firewatir for
http://www.code.google.com/p/firewatir/trunk using any sub version client.
It works with Firefox 1.5 and above versions. The execution speed which was
the problem earlier has been resolved. Now execution speed has improved a
lot. Comparable to using Watir with IE.
Let me know you exprience/doubts/queries/suggestions regarding the same.
Currently it doesn't support forms, frames, table row and table cells.
Regards,
Angrez
On 12/1/06, Nathan wrote:
>
> Hi, I am an experienced developer/tester and have been using Watir for a
> couple of months now. I have read a lot about Selenium also, and have noted
> that people are concerned about the need to install Selenium on the server,
> because it has to be served from the same location as the web page being
> tested. Well I share this concern, but not because it might be difficult, or
> because of some other experience reason, rather because it is not good
> practice, nor will we ever install third party tools on our production
> servers. This causes a problem with using selenium for my company, and that
> is that our production environment is generally more stable and better than
> our dev or qa environments. So what to do? I've read about FireWatir, but
> have not been able to find much on it. I'd prefer not to rebuild Firefox
> with that COM-like plugin because that makes it so that I'm not using
> exactly the same firefox as the rest of the world, and could produce
> different results than the real wor
> ld sees, I also am unable to find the plugin for firefox as a separate
> program plugin. So I guess I can't test firefox or safari with watir. Does
> anybody know of a way to accomplish what I wish with JUST Watir? Please
> help, thanks.
>
> Nathan
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5549&messageID=15431#15431
> _______________________________________________
> 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/20061201/68bc6c22/attachment.html
From zeljko.filipin at gmail.com Fri Dec 1 04:36:04 2006
From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=)
Date: Fri, 1 Dec 2006 10:36:04 +0100
Subject: [Wtr-general] How can i upload an image when i click browse
button(input type=File)
In-Reply-To: <44441341.1164953580162.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <47520692.1164949329965.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
<44441341.1164953580162.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
On 12/1/06, Dhamodharan wrote:
>
> i'm getting this error
> The above file is in valid
> ie.fileField(:name, "avatar").set("damu")
Hi Damu,
File is invalid because windows can not find it. Make sure that you provide
full path to file, something like this:
ie.fileField(:name, "avatar").set('C:\damu.txt')
--
Zeljko Filipin
zeljkofilipin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061201/051bb284/attachment.html
From forum-watir-users at openqa.org Fri Dec 1 08:49:59 2006
From: forum-watir-users at openqa.org (Fletch)
Date: Fri, 01 Dec 2006 07:49:59 CST
Subject: [Wtr-general] Skipping Tests
Message-ID: <53064730.1164981041536.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Hello All,
I have been looking at using WATIR over the past couple of days, and have designed a couple of tests, however, in certain tests, if an assertion is not true, then I want to jump to another point in my script.
Is this possible?
Thanks.
PMF.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5563&messageID=15496#15496
From phlip2005 at gmail.com Fri Dec 1 09:49:05 2006
From: phlip2005 at gmail.com (Phlip)
Date: Fri, 1 Dec 2006 06:49:05 -0800
Subject: [Wtr-general] Skipping Tests
References: <53064730.1164981041536.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <037001c71557$da13feb0$81a1b04c@Marley>
Fletch wrote:
> I have been looking at using WATIR over the past couple of days, and have
> designed a couple of tests, however, in certain tests, if an assertion is
> not true, then I want to jump to another point in my script.
>
> Is this possible?
Just say if instead of assert.
However, terms like "jump", "skipping tests", and "assertion is not true"
make us wonder if your tests are narrow, encapsulated, robust, and isolated.
If your tests are run-on, if they walk the program thru many of its states,
then your tests are not helping to decouple your code.
Are most of your tests on the layer under the GUI?
--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
From forum-watir-users at openqa.org Fri Dec 1 09:51:35 2006
From: forum-watir-users at openqa.org (Vince)
Date: Fri, 01 Dec 2006 08:51:35 CST
Subject: [Wtr-general] Skipping Tests
In-Reply-To: <53064730.1164981041536.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <64064341.1164984821911.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
PMF,
I'm not sure if I followed the question completely, so straighten me out if I'm off...
My first thought here would be to simply use the assertion to set a flag, and drive your others tests off of that flag by wrapping the body of the test in a simple if statement.
A cleaner way to do this, though, would be with method calls like this:
class SampleTests < Test::Unit::TestCase
def test_mytest1
if assert(Something)
whentrue
else
whenfalse
end
end
def whentrue
#do stuff when the assertion passes
end
def whenfalse
#do stuff when the assertion fails
end
end
If the method name isn't preceded with "test", then it won't automatically be run and instead will need to be called. This should give you the flexibility you're looking for.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5563&messageID=15498#15498
From forum-watir-users at openqa.org Fri Dec 1 10:16:21 2006
From: forum-watir-users at openqa.org (Fletch)
Date: Fri, 01 Dec 2006 09:16:21 CST
Subject: [Wtr-general] Skipping Tests
In-Reply-To: <53064730.1164981041536.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <54672544.1164986211592.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
That is kind of what I mean, however in my case this would lead to a lot of repeated code.
Test1
(if True)
Action2
Action3
Action4
Action5
(else)
Action4
Action5
I have been thinking about a goto(Action4) which works, but as my code is sequential, it follows Action4 with Action2, Action3, and Action4 again
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5563&messageID=15502#15502
From forum-watir-users at openqa.org Fri Dec 1 10:22:29 2006
From: forum-watir-users at openqa.org (vijay)
Date: Fri, 01 Dec 2006 09:22:29 CST
Subject: [Wtr-general] Checking whether images inside a table are enabled or
disabled
Message-ID: <49873969.1164986579868.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Hello people,
I have got to check whether images present in a table are enabled or disabled. I am not even very sure whether they are images. Their "html content: is like the following:
Is there a way that I can check whether this image (or link or label) is enabled or not?
Thanks, in advance,
Vijay
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5565&messageID=15503#15503
From forum-watir-users at openqa.org Fri Dec 1 10:34:07 2006
From: forum-watir-users at openqa.org (Dave Munns)
Date: Fri, 01 Dec 2006 09:34:07 CST
Subject: [Wtr-general] setting text field in table
In-Reply-To: <37526354.1164841855850.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <38261566.1164987283331.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Thanks Paul. Referencing the text_field by index does indeed work.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5520&messageID=15507#15507
From forum-watir-users at openqa.org Fri Dec 1 10:43:33 2006
From: forum-watir-users at openqa.org (Fletch)
Date: Fri, 01 Dec 2006 09:43:33 CST
Subject: [Wtr-general] Skipping Tests
In-Reply-To: <64064341.1164984821911.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <58438118.1164987843582.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
I understand what you mean now.
Thanks for the help.
When the test fails, I just call one of the later methods, which misses out on all the methods that are used when the test is successful.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5563&messageID=15508#15508
From mail at chriss-baumann.de Fri Dec 1 10:47:12 2006
From: mail at chriss-baumann.de (Christian Baumann)
Date: Fri, 01 Dec 2006 16:47:12 +0100
Subject: [Wtr-general] Skipping Tests
In-Reply-To: <54672544.1164986211592.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <54672544.1164986211592.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <45704E80.7080103@chriss-baumann.de>
Hi Fletch,
for Your example:
if Test1 == true
begin
Action2
Action3
end
Action4
Action5
The actions 4 & 5 are executed always, no matter if the result of Test1
is true or false...
To avoid repeated code: What?s about modularisation? Like
methods/functions? Have a look at
http://en.wikipedia.org/wiki/Modularity_(programming) or ask google.
Regards,
Christian
Fletch schrieb:
> That is kind of what I mean, however in my case this would lead to a lot of repeated code.
>
> Test1
> (if True)
> Action2
> Action3
> Action4
> Action5
> (else)
> Action4
> Action5
>
> I have been thinking about a goto(Action4) which works, but as my code is sequential, it follows Action4 with Action2, Action3, and Action4 again
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5563&messageID=15502#15502
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
From forum-watir-users at openqa.org Fri Dec 1 13:53:29 2006
From: forum-watir-users at openqa.org (Nathan)
Date: Fri, 01 Dec 2006 12:53:29 CST
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To: <456F4C7C.50901@tejasconsulting.com>
Message-ID: <49316765.1164999242017.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
So I haven't rejected Firewatir, rather I have not been able to find any new info on it, and as far as the site here goes, it appears to have been abandoned. I'd like very much to use it and develop it more if necessary. We would like a good way to test in Firefox and Safari that isn't proprietary, and free if possible. One difficulty in our experience, though it is a good thing, is that only Microsoft products are bound to putting OLE/COM servers in their products, so as Firefox and Safari don't have these things, I'll need to rely on a plugin. I am not opposed to plugins to do the job. Quick Test Pro after all uses a plugin to automate both Firefox and IE, but it has no support for Safari, and it's pretty costly for what we get. Also it doesn't do everything we want it to do. The one thing I want to completely avoid though is recompiling a browser just so we can test on it - a plugin is something everyone can get and use, but recompiling the browser voids our tests in our mind. If it works here or doesn't work here when we've recompiled the browser, then we cannot guarantee even similar results to people who use a precompiled browser. We're a professional business and we need to guarantee our product and have reproducible results. I disagree that automating something "always has the potential to perturb the results" as you put it. If that were indeed the case then automation would not be as common as it is, and more people would be more reluctant to pursue it.
Thanks for the insight,
Nathan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5549&messageID=15518#15518
From forum-watir-users at openqa.org Fri Dec 1 13:55:56 2006
From: forum-watir-users at openqa.org (Nathan)
Date: Fri, 01 Dec 2006 12:55:56 CST
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To:
Message-ID: <58496517.1164999386593.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Thanks for the link to the code. I just downloaded it and tried to install jssh to no avail - it doesn't work. First of all the installation doc is completely wrong about what I install, because that's not what I downloaded. So I manually copied those files over to my firefox install directory and I installed the firewatir gem and all of the unittests fail.
Any suggestions then?
Have you actually used Firewatir, or are you just telling me where to get it?
Thanks, need more info,
Nathan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5549&messageID=15519#15519
From esjewett at gmail.com Fri Dec 1 14:48:17 2006
From: esjewett at gmail.com (Ethan Jewett)
Date: Fri, 1 Dec 2006 13:48:17 -0600
Subject: [Wtr-general] Checking whether images inside a table are
enabled or disabled
In-Reply-To: <49873969.1164986579868.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <49873969.1164986579868.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <68f4a0e80612011148k4a38c8e2x84e59019dce74375@mail.gmail.com>
Vijay,
It is hard to tell what, exactly, you are looking for without an
example of what an "enabled" object looks like *and* what a "disabled"
object looks like.
However, it looks to me like Watir 1.5.1.1127 supports the following
methods for every object on a web-page:
exists?
enabled?
attribute_value(attribute_name)
I think at least one of these can be used to solve your problem.
Ethan
On 12/1/06, vijay wrote:
> Hello people,
>
> I have got to check whether images present in a table are enabled or disabled. I am not even very sure whether they are images. Their "html content: is like the following:
>
>
>
> Is there a way that I can check whether this image (or link or label) is enabled or not?
>
> Thanks, in advance,
> Vijay
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5565&messageID=15503#15503
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From faught at tejasconsulting.com Fri Dec 1 15:54:20 2006
From: faught at tejasconsulting.com (Danny Faught)
Date: Fri, 01 Dec 2006 13:54:20 -0700
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To: <49316765.1164999242017.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <49316765.1164999242017.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <4570967C.6050501@tejasconsulting.com>
Nathan wrote:
> We would like a good way to test in Firefox and Safari that isn't proprietary, and free if possible.
For Safari, the first thing I would try is AppleScript. There's a
decent chance that Safari is already scriptable using AppleScript, and
any other language that has a bridge to the same interfaces that
AppleScript uses.
> I disagree that automating something "always has the potential to perturb the results" as you put it.
We can reduce our exposure to that potential by being careful about our
approach. So there are a good number of automation projects that do
succeed, when people are smart about using the tools.
-Danny
From patslists at gmail.com Fri Dec 1 15:26:14 2006
From: patslists at gmail.com (Pat Mac)
Date: Fri, 1 Dec 2006 15:26:14 -0500
Subject: [Wtr-general] Extreme slowdown moving from 1.4.1 to 1.5.1.1127
Message-ID: <212711160612011226i1948fc33mac83f91ad23c2ee8@mail.gmail.com>
Hi All, I've read through the archives I could find relating to performance
issues related to 1.5 but I didn't see any concrete solutions or reasons why
the slowdown is occurring. Running an existing script using the profiler my
execution time goes from 170 seconds to 425 seconds. Looking at the profiler
output I notice the following:
WIN32OLE#each is the top consumer in both profiles. In 1.5 it's taking
70.15seconds vs
59.19 in 1.4. Not a huge jump, but noticeable when running 100+ cases.
WIN32OLE#invoke is the number 2 consumer in both profiles taking
64.85seconds in
1.5 but only 25.69 seconds in 1.4. This is obviously quite significant.
Beyond the top two, the next highest in 1.4 is Logger#add taking just over
12 seconds. However, in 1.5 I see seven additional methods taking 20 seconds
or longer. The biggest hogs are Watir::Element#type at 62.64 seconds,
Class#new at 42.49 seconds, Watir::Element#assert_exists at 41.68 seconds
and Array#include? at 39.47 seconds.
I'm at a loss here. I'm running these tests on the same machine with the
same version of Ruby. I originally wanted to upgrade for the click_no_wait
functionality and modal dialog functionality but I can't take this kind of a
performance hit. Is there something obvious I'm missing? I did notice the
slowdown appears to be significant on pages with lots of controls. At this
point I'm probably going to backport the click_no_wait and modal dialog
functionality to 1.4.1 unless anyone has an idea of what I'm doing wrong
here.
--Pat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061201/2e4b955d/attachment.html
From ajahns at gmail.com Fri Dec 1 21:16:00 2006
From: ajahns at gmail.com (Alan Jahns)
Date: Fri, 1 Dec 2006 18:16:00 -0800
Subject: [Wtr-general] Set focus to original window
Message-ID: <11ab23860612011816w615c0df1l90de8cfdc2a62774@mail.gmail.com>
Hello,
I'm new to watir and scripting in general. The tool is still easy enough
that I have automated many testcases already. On to my problem:
I have a page where selecting the sign in link opens a new window with the
sign in form, I set watir's focus on this new window with the attach command
and can fill it out fine and submit. After submission this new window closes
and the original window refreshes to reflect the successful sign in with
some text showing username etc.
My problem is after the sign in info is submitted and the new window closes
the script ends. I have some simple if/else statements to check if some text
strings are on the original window, but it seems that it no longer sees the
original window. How would I make watir switch focus back?
Thanks in advance!
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061201/d1887c23/attachment-0001.html
From faught at tejasconsulting.com Fri Dec 1 22:49:09 2006
From: faught at tejasconsulting.com (Danny Faught)
Date: Fri, 01 Dec 2006 20:49:09 -0700
Subject: [Wtr-general] Set focus to original window
In-Reply-To: <11ab23860612011816w615c0df1l90de8cfdc2a62774@mail.gmail.com>
References: <11ab23860612011816w615c0df1l90de8cfdc2a62774@mail.gmail.com>
Message-ID: <4570F7B5.70700@tejasconsulting.com>
Alan Jahns wrote:
> I have some simple if/else statements to check
> if some text strings are on the original window, but it seems that it no
> longer sees the original window. How would I make watir switch focus back?
One likely mistake is to use the same variable, like "ie", for both the
parent and the child window. Make sure to use separate variables for
each window that you want to keep track of.
-Danny
From angrez at gmail.com Sat Dec 2 00:21:53 2006
From: angrez at gmail.com (Angrez Singh)
Date: Sat, 2 Dec 2006 10:51:53 +0530
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To: <58496517.1164999386593.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References:
<58496517.1164999386593.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
Hi Nathan,
Could you please let me know what difficulty you faced while installing gem
and JSSh xpi. I have used the Firewatir code and I currently own the project
at Google. I have tested its installation on 3 - 4 machines and didn't have
any problems either with XPI or with the Firewatir gem.
It currently works only on windows.
Let me know what problems you faced?
Regards,
Angrez
On 12/2/06, Nathan wrote:
>
> Thanks for the link to the code. I just downloaded it and tried to
> install jssh to no avail - it doesn't work. First of all the installation
> doc is completely wrong about what I install, because that's not what I
> downloaded. So I manually copied those files over to my firefox install
> directory and I installed the firewatir gem and all of the unittests fail.
>
> Any suggestions then?
>
> Have you actually used Firewatir, or are you just telling me where to get
> it?
>
> Thanks, need more info,
>
> Nathan
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5549&messageID=15519#15519
> _______________________________________________
> 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/20061202/7cce2a1f/attachment.html
From angrez at gmail.com Sat Dec 2 00:29:39 2006
From: angrez at gmail.com (Angrez Singh)
Date: Sat, 2 Dec 2006 10:59:39 +0530
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To: <49316765.1164999242017.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <456F4C7C.50901@tejasconsulting.com>
<49316765.1164999242017.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
Hi Nathan,
Get the latest code from the following location.
http://firewatir.googlecode.com/svn/trunk/Installation/
It contains installation doc, XPI and Firewatir gem.
Let me know the problems you have faced. Its still in development and this
will help me in generating the help document or installation document more
accurately.
Regards,
Angrez
On 12/2/06, Nathan wrote:
>
> So I haven't rejected Firewatir, rather I have not been able to find any
> new info on it, and as far as the site here goes, it appears to have been
> abandoned. I'd like very much to use it and develop it more if
> necessary. We would like a good way to test in Firefox and Safari that
> isn't proprietary, and free if possible. One difficulty in our experience,
> though it is a good thing, is that only Microsoft products are bound to
> putting OLE/COM servers in their products, so as Firefox and Safari don't
> have these things, I'll need to rely on a plugin. I am not opposed to
> plugins to do the job. Quick Test Pro after all uses a plugin to automate
> both Firefox and IE, but it has no support for Safari, and it's pretty
> costly for what we get. Also it doesn't do everything we want it to
> do. The one thing I want to completely avoid though is recompiling a
> browser just so we can test on it - a plugin is something everyone can get
> and use, but recompiling the browser voids our tests i
> n our mind. If it works here or doesn't work here when we've recompiled
> the browser, then we cannot guarantee even similar results to people who use
> a precompiled browser. We're a professional business and we need to
> guarantee our product and have reproducible results. I disagree that
> automating something "always has the potential to perturb the results" as
> you put it. If that were indeed the case then automation would not be as
> common as it is, and more people would be more reluctant to pursue it.
>
> Thanks for the insight,
>
> Nathan
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5549&messageID=15518#15518
> _______________________________________________
> 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/20061202/092d027c/attachment.html
From forum-watir-users at openqa.org Sat Dec 2 01:47:12 2006
From: forum-watir-users at openqa.org (Dhamodharan)
Date: Sat, 02 Dec 2006 00:47:12 CST
Subject: [Wtr-general] how to get dato for a signup module using Class and
methods.....
Message-ID: <51708180.1165042062181.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Hi friends ,
Tell me how to include class and methods in scripts for testing Signup module...
I will tell u the steps ..
please reply mmediately my friend
1.What are require to srtat? like require watir....
2.open a site..??
3.Click signup form..
4.Enter data's and then submit the form...???
5.Hi friends please use class and methods to do this example..
it's urgent..
waiting for ur replies
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5576&messageID=15540#15540
From amit.garde at gmail.com Sat Dec 2 02:19:59 2006
From: amit.garde at gmail.com (Amit Garde)
Date: Sat, 2 Dec 2006 12:49:59 +0530
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To:
References:
<58496517.1164999386593.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <7661e6730612012319g29db186l35e1491098e3652c@mail.gmail.com>
On 12/2/06, Angrez Singh wrote:
> Could you please let me know what difficulty you faced while installing gem
> and JSSh xpi. I have used the Firewatir code and I currently own the project
> at Google. I have tested its installation on 3 - 4 machines and didn't have
> any problems either with XPI or with the Firewatir gem.
>
> It currently works only on windows.
In more detail: the Firewatir Ruby code hasn't really been tested on
non-Windows platforms yet, but, because of the way Firewatir is
designed, you should be able to drive Firefox running on any machine
and OS, as long as the JSSh extension is installed and enabled.
Firewatir sends browser driving JS code to a Firefox instance on a
particular socket, so if you want to test with Firefox on Linux for
example, you can run a Firefox instance on Linux, have your Firewatir
installation and scripts run on Windows, and drive the Firefox
instance remotely.
This might be a little slower than a complete Firewatir and Firefox
combo both running on the same Linux machine, but Firewatir speed has
improved quite a bit since the days it was 40X slower than the IE
equivalent. There is still work to be done (and under way) but I think
Firewatir is quite a viable option for Firefox driven testing (and
will get better).
Let us know if you need to experiment with remotely driving Firefox
and I'll rustle up a document or HOWTO.
Amit
From amit.garde at gmail.com Sat Dec 2 02:38:09 2006
From: amit.garde at gmail.com (Amit Garde)
Date: Sat, 2 Dec 2006 13:08:09 +0530
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To: <49316765.1164999242017.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <456F4C7C.50901@tejasconsulting.com>
<49316765.1164999242017.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <7661e6730612012338t1c7cf734h6009c76c4183aa0e@mail.gmail.com>
On 12/2/06, Nathan wrote:
>So I haven't rejected Firewatir, rather I have not been able to find
any new info on it, and >as far as the site here goes, it appears to
have been abandoned.
Firewatir moved to Google code as a seprate project because it seemed
to be agreed that this best served the needs both of Watir and
Firewatir. Firewatir has not been abandoned; site maintenance and code
updates have been a little low key, partly because the level of
interest in Firewatir (at least as evidenced on this list) doesn't
suggest that much breath is being held, and partly because we
(primarily Angrez) have been focusing on improving Firewatir
performance to bring it being competitive with to what you see with
Watir/IE. Early Firewatir versions were very slow (30X to 40X slower
than Watir/IE), which made it very
frustrating to use it for Firefox testing. The slowness issue should
largely have been addressed, though there is much testing, code
cleanup, packaging, and documentation to be done. Expect some visible
outcome of this in the not too distant future.
> I'd like very much to use it and develop it more if necessary. We would like a good way
> to test in Firefox and Safari that isn't proprietary, and free if possible. One difficulty in our
> experience, though it is a good thing, is that only Microsoft products are bound to putting
> OLE/COM servers in their products, so as Firefox and Safari don't have these things, I'll
> need to rely on a plugin. I am not opposed to plugins to do the job. Quick Test Pro after
> all uses a plugin to automate both Firefox and IE, but it has no support for Safari, and it's
> pretty costly for what we get. Also it doesn't do everything we want it to do. The one
> thing I want to completely avoid though is recompiling a browser just so we can test on it
> - a plugin is something everyone can get and use, but recompiling the browser voids our
> tests in our mind. If it works here or doesn't work here when we've recompiled the
> browser, then we cannot guarantee even similar results to people who use a precompiled
> browser.
Firewatir requires an extension to be installed in Firefox. This
extension - JSSh - is now available packaged as a .xpi, so you don't
have to recompile Firefox to use it. You will however need to install
the extension, so you'll need to decide whether
Firefox-plus-JSSh-extension-installed counts, for your purposes, as a
browser modification at par with recompilation or not.
For what it's worth, we are introducing Firewatir into our test suites
where I work, and have not thus far encountered anything that would
lead us to question the validity of any tests that we run using
Firewatir.
Amit
From zeljko.filipin at gmail.com Sat Dec 2 07:55:48 2006
From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=)
Date: Sat, 2 Dec 2006 13:55:48 +0100
Subject: [Wtr-general] how to get dato for a signup module using Class
and methods.....
In-Reply-To: <51708180.1165042062181.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <51708180.1165042062181.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
Take a look at WATIR User Guide (
http://www.openqa.org/watir/watir_user_guide.html).
--
Zeljko Filipin
zeljkofilipin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061202/aed5311f/attachment.html
From zeljko.filipin at gmail.com Sat Dec 2 08:03:26 2006
From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=)
Date: Sat, 2 Dec 2006 14:03:26 +0100
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To: <51009756.1164916267478.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <51009756.1164916267478.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
On 11/30/06, Nathan wrote:
>
> So I guess I can't test firefox or safari with watir.
>
Please forgive me if it is already mentioned in this thread (I could not
find it), but there is also SafariWatir (http://safariwatir.rubyforge.org/).
--
Zeljko Filipin
zeljkofilipin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061202/74d430c3/attachment-0001.html
From neridan at paradise.net.nz Sun Dec 3 03:33:53 2006
From: neridan at paradise.net.nz (Neil Daniell)
Date: Sun, 03 Dec 2006 21:33:53 +1300
Subject: [Wtr-general] Identifying a tab to click on
Message-ID: <45728BF1.7010109@paradise.net.nz>
I am trying to use Watir to click on secondTab but cannot seem to get the following to work:
$ie = IE.new
....
$ie.div(:index, 1).table(:index,1)[1][2].span(:index, 1).click
Can someone indicate to me how I can fix this?
Is it possible to select an element via the class?
Page source:(jsp)
<%-- Show the Second Tab --%>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061203/0f001d66/attachment.html
-------------- next part --------------
An embedded message was scrubbed...
From: "Daniell, Neil"
Subject: main.jsp
Date: Thu, 30 Nov 2006 17:18:18 +1300
Size: 4399
Url: http://rubyforge.org/pipermail/wtr-general/attachments/20061203/0f001d66/attachment.mht
From tester.paul at gmail.com Sun Dec 3 10:20:48 2006
From: tester.paul at gmail.com (Paul Carvalho)
Date: Sun, 3 Dec 2006 10:20:48 -0500
Subject: [Wtr-general] Identifying a tab to click on
In-Reply-To: <45728BF1.7010109@paradise.net.nz>
References: <45728BF1.7010109@paradise.net.nz>
Message-ID: <37c405480612030720i1c8ae861jbfd99c59471516f@mail.gmail.com>
Maybe you're being too specific?
Did you try just: $ie.span(:index, 1).click
Or, based on the id tag, does this work: $ie.span(:id, 'firstTab').click
On 03/12/06, Neil Daniell wrote:
>
> I am trying to use Watir to click on secondTab but cannot seem to get the following to work:
> $ie = IE.new
> ....
> $ie.div(:index, 1).table(:index,1)[1][2].span(:index, 1).click
> Can someone indicate to me how I can fix this?
> Is it possible to select an element via the class?
>
> Page source:(jsp)
>
>
> <%-- Show the Second Tab --%>
> onclick="if (PageUI.isLoaded()) selectTab(1);"
> onfocus="this.click();"
> title="Second Tab">
>
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061203/69d080f4/attachment.html
From ac251404 at ohio.edu Sun Dec 3 12:37:23 2006
From: ac251404 at ohio.edu (Alex Ciarlillo)
Date: Sun, 03 Dec 2006 12:37:23 -0500
Subject: [Wtr-general] Editing fields in 'Save As' dialog
Message-ID: <45730B53.4060507@ohio.edu>
Hi,
I am trying to automate the download of a file from a website. I want
the user to be able to set the 'Save in:' and 'File Name:' edit boxes
but I am not sure how to approach this. I have the following code which
gets me as far as the Save As dialog but beyond that I am unsure of what
winClicker methods I need to change these text fields.
#requires
require 'watir'
require 'watir/winClicker'
#includes
include Watir
browser = IE.new
clicker = WinClicker.new
browser.goto( 'http://www.deviantart.com/download/29747336/' )
clicker.clickWindowsButton('File Download', 'Save')
After this I tried adding the following:
h = clicker.getWindowHandle('Save As')
clicker.setTextValueForFileNameField( h , 'test.rar' )
But I got the message 'Unable to obtain handle for filename chooser'
Also I need to change the 'Save In:' field but I'm even less sure how to
approach the combobox.
Any tips or insight on how to accomplish this would be really appreciated.
Thanks,
-Alex
From bret at pettichord.com Sun Dec 3 15:35:27 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Sun, 3 Dec 2006 14:35:27 -0600
Subject: [Wtr-general] Automation Workshop to be held Jan 12-14
Message-ID:
I am co-hosting a workshop on open-source testing frameworks Jan 12-14 in
Austin. This is actually the seventh meeting of the Austin Workshops on Test
Automation. I am looking forward to sharing what we've been doing with
open-source tools at DataCert, as well as hearing what others have been up
to. Workshop attendance will be limited to 25 people. If you would like to
come, please take a look at our call for participation:
http://awta.wikispaces.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061203/798a636d/attachment.html
From forum-watir-users at openqa.org Mon Dec 4 01:27:25 2006
From: forum-watir-users at openqa.org (vijay)
Date: Mon, 04 Dec 2006 00:27:25 CST
Subject: [Wtr-general] Checking whether images inside a table
are enabled or disabled
In-Reply-To: <68f4a0e80612011148k4a38c8e2x84e59019dce74375@mail.gmail.com>
Message-ID: <55115819.1165213684310.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Hi Ethan,
Thanks for your reply and sorry for not explaining the issue clearly.
There is a page in our application that contains links like "Instructions", "Step 1. Details", "Step 2. Inventors" etc [These are actually recognized as "TD"s in the 'View -> Source. The table containing this has got an unique id to recognize it]. While entering into our application, all links, other than "Instructions" and "Step 1. Details", should be disabled. This means that one can click on only the above-mentioned two links (Instructions and Step 1. Details). The other links will be grayed out and cannot be clicked on (they will appear as just words with no "hand-pointer" , one which gets displayed when the mouse traverses over a web link). I want to verify this with Watir. I am at a loss about how to do that.
A sample html for an enabled link is :
Active Element: [A], Frame: [Detail], Index: [35]
Step 1. Details) ].
A sample html for a disabled link is:
Active Element: [TD], Frame: [Detail], Index: [41]
Step 2. Inventors
Hope this gives you a clearer picture. Thanks, in advance, for your help.
Vijay
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5565&messageID=15596#15596
From forum-watir-users at openqa.org Mon Dec 4 02:04:13 2006
From: forum-watir-users at openqa.org (san)
Date: Mon, 04 Dec 2006 01:04:13 CST
Subject: [Wtr-general] Can't Control JavaScript PopUp Window....
In-Reply-To: <4440693B7CFF2440ABC2E0BE480DABA10A3640@EX01-2.rl.gov>
Message-ID: <65001637.1165215883124.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
I'm Using 1.4.1
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5510&messageID=15597#15597
From forum-watir-users at openqa.org Mon Dec 4 02:08:54 2006
From: forum-watir-users at openqa.org (san)
Date: Mon, 04 Dec 2006 01:08:54 CST
Subject: [Wtr-general] Can't Control JavaScript PopUp Window....
In-Reply-To: <59161833.1164811809837.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <55593074.1165216164805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Ya... Of Course Its Useful, But I Don't Need To Click On Any Button, But On Other Page Links That Lies On The Popup Page & After Clicking One Of The Links On The Pop Up It Will Vanish & The Clicked Link Will Be Opened In The Main Window..... How Can I?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5505&messageID=15598#15598
From forum-watir-users at openqa.org Mon Dec 4 03:59:42 2006
From: forum-watir-users at openqa.org (Fletch)
Date: Mon, 04 Dec 2006 02:59:42 CST
Subject: [Wtr-general] Selecting Links
Message-ID: <47751265.1165222850925.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Hello All,
I have a form which has the following layout
[u]Link1[/u] Button
[u]Link2[/u] Button
[u]Link3[/u] Button
I want to be able to use WATIR to click the button beside [u]Link2[/u], my thinking is that I want to get the index of the link containing text "Link2" and then use this value to - Button(:index, linkIndex).click
Is it possible to return the index of the link?
Thanks,
PMF.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5594&messageID=15602#15602
From zeljko.filipin at gmail.com Mon Dec 4 04:35:01 2006
From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=)
Date: Mon, 4 Dec 2006 10:35:01 +0100
Subject: [Wtr-general] Selecting Links
In-Reply-To: <47751265.1165222850925.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <47751265.1165222850925.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
On 12/4/06, Fletch wrote:
>
> Is it possible to return the index of the link?
I have watir 1.5.1.1081 and it is not supported there.
irb(main):005:0> ie.link(:text, "link").index
NoMethodError: undefined method `index' for #
This looks like interesting feature request (maybe newer versions of watir
have this already implemented).
--
Zeljko Filipin
zeljkofilipin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061204/d5825430/attachment-0001.html
From zeljko.filipin at gmail.com Mon Dec 4 05:15:40 2006
From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=)
Date: Mon, 4 Dec 2006 11:15:40 +0100
Subject: [Wtr-general] Checking whether images inside a table are
enabled or disabled
In-Reply-To: <55115819.1165213684310.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <68f4a0e80612011148k4a38c8e2x84e59019dce74375@mail.gmail.com>
<55115819.1165213684310.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
In your case, disabled link is not a link with disabled property (link text), it is a table cell (
cell
text
).
This will tell you that "Step 1. Details" is link, not in table cell.
irb(main):025:0> ie.link(:text, "Step 1. Details").exists?
=> true
irb(main):026:0> ie.cell(:text, "Step 1. Details").exists?
=> false
This will tell you that "Step 2. Inventors" is in table cell, not link.
irb(main):023:0> ie.link(:text, "Step 2. Inventors").exists?
=> false
irb(main):024:0> ie.cell(:text, "Step 2. Inventors").exists?
=> true
You should take a look at http://w3schools.com/html/default.asp, it is good
html tutorial.
--
Zeljko Filipin
zeljkofilipin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061204/8898624c/attachment.html
From niegq at nec-as.nec.com.cn Mon Dec 4 05:51:25 2006
From: niegq at nec-as.nec.com.cn (Nie Guoqiang)
Date: Mon, 04 Dec 2006 18:51:25 +0800
Subject: [Wtr-general] Selecting Links
In-Reply-To: <47751265.1165222850925.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <47751265.1165222850925.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <20061204185024.11A5.NIEGQ@nec-as.nec.com.cn>
Yes
You can access this links by index.
Please refer to ie.show_links()
> Hello All,
>
> I have a form which has the following layout
> [u]Link1[/u] Button
> [u]Link2[/u] Button
> [u]Link3[/u] Button
>
> I want to be able to use WATIR to click the button beside [u]Link2[/u], my thinking is that I want to get the index of the link containing text "Link2" and then use this value to - Button(:index, linkIndex).click
>
> Is it possible to return the index of the link?
>
> Thanks,
>
> PMF.
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5594&messageID=15602#15602
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
From sikander at marlabs.com Mon Dec 4 07:57:26 2006
From: sikander at marlabs.com (sikander)
Date: Mon, 4 Dec 2006 18:27:26 +0530
Subject: [Wtr-general] Paramerization in Ruby
Message-ID: <007001c717a3$c02a6360$6520a8c0@caseshare.com>
Hi All!
Here is the my code, for which i need parameterization
require 'watir'
require 'win32ole'
include Watir
test_site = 'http://www.google.com'
ie = IE.new
ie.goto(test_site)
ie.text_field(:name, "q").set("pickaxe")
ie.button(:name, "btnG").click
[Note: In QTP to parameterize the above value, we write the following code
Browser("Google").Page("Google").WebEdit("q").Set DataTable("p_Text",
dtGlobalSheet)
Browser("Google").Page("Google").WebButton("Google Search").Click
So can anybody replace the above code with ruby syntax?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061204/c9056ebe/attachment.html
From zeljko.filipin at gmail.com Mon Dec 4 08:09:46 2006
From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=)
Date: Mon, 4 Dec 2006 14:09:46 +0100
Subject: [Wtr-general] ie.minimize broken in watir-1.5.1.1127
In-Reply-To:
References:
Message-ID:
On 11/29/06, Charley Baker wrote:
>
> The errors from core_tests.rb should be fixed now. The latest xpath
> test was getting in the way causing spurious errors. I've looked over
> the changes and don't see anything inherently that would cause this
> problem. I can't reproduce it personally and I'm stumped. Let me know
> if you come up with any additional information. I'll keep poking
> around.
Charley,
I have installed autoit, and now ie.minimize works. You should emphasize in
release notes that autoit is required (or is it only in my case)?.
I have build gem from the latest build and installed it and now all core
tests pass.
But, I still have the problem from WTR-108 (file_field.set not working).
I do this
irb(main):007:0> ie.file_field(:index, 1).set('c:\ruby\ChangeLog.txt')
=> nil
and nothing happens. Really nothing. And all that I get back is nil (file
field at that page and file exist). Am I doing something wrong?
--
Zeljko Filipin
zeljkofilipin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061204/330dfd38/attachment.html
From mail at chriss-baumann.de Mon Dec 4 08:22:06 2006
From: mail at chriss-baumann.de (Christian Baumann)
Date: Mon, 04 Dec 2006 14:22:06 +0100
Subject: [Wtr-general] Paramerization in Ruby
In-Reply-To: <007001c717a3$c02a6360$6520a8c0@caseshare.com>
References: <007001c717a3$c02a6360$6520a8c0@caseshare.com>
Message-ID: <457420FE.90409@chriss-baumann.de>
http://www.rubycentral.com/book/
sikander schrieb:
> Hi All!
>
> Here is the my code, for which i need parameterization
> require 'watir'
> require 'win32ole'
>
> include Watir
>
> test_site = 'http://www.google.com'
> ie = IE.new
> ie.goto(test_site)
> ie.text_field(:name, "q").set("pickaxe")
> ie.button(:name, "btnG").click
> [Note: In QTP to parameterize the above value, we write the
> following code
> Browser("Google").Page("Google").WebEdit("q").Set
> DataTable("p_Text", dtGlobalSheet)
> Browser("Google").Page("Google").WebButton("Google
> Search").Click
>
> So can anybody replace the above code with ruby syntax?
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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/20061204/24fb7c48/attachment.html
From herr.kreutzer at googlemail.com Mon Dec 4 08:30:28 2006
From: herr.kreutzer at googlemail.com (Christian Kreutzer)
Date: Mon, 4 Dec 2006 14:30:28 +0100
Subject: [Wtr-general] Paramerization in Ruby
In-Reply-To: <007001c717a3$c02a6360$6520a8c0@caseshare.com>
References: <007001c717a3$c02a6360$6520a8c0@caseshare.com>
Message-ID:
Hi Sikander,
Google should be your friend on the search for some good ruby
tutorials. The archive of this mailing list has always been a good
resource for me.
Christian
On 12/4/06, sikander wrote:
>
>
>
> Hi All!
>
> Here is the my code, for which i need parameterization
> require 'watir'
> require 'win32ole'
>
> include Watir
>
> test_site = 'http://www.google.com'
> ie = IE.new
> ie.goto(test_site)
>
> ie.text_field(:name, "q").set("pickaxe")
> ie.button(:name, "btnG").click
>
> [Note: In QTP to parameterize the above value, we write the following code
> Browser("Google").Page("Google").WebEdit("q").Set
> DataTable("p_Text", dtGlobalSheet)
> Browser("Google").Page("Google").WebButton("Google
> Search").Click
>
> So can anybody replace the above code with ruby syntax?
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
From dave.hoover at gmail.com Mon Dec 4 08:45:56 2006
From: dave.hoover at gmail.com (Dave Hoover)
Date: Mon, 4 Dec 2006 07:45:56 -0600
Subject: [Wtr-general] SafariWatir 0.2.0
Message-ID: <11c8704e0612040545w2ea59152q5c3db37e4211c686@mail.gmail.com>
SafariWatir (http://safariwatir.rubyforge.org/) has been updated to
use the rb-appscript project (http://rb-appscript.rubyforge.org/)
rather than depending on AppleScript to do it's dirty work. This has
improved performance dramatically.
You can watch SafariWatir executing its test suite in this screencast:
http://safariwatir.rubyforge.org/safariwatir_script_0.2.0.mov
Here's the test suite source:
http://rubyforge.org/viewvc/trunk/safariwatir_script.rb?revision=25&root=safariwatir&view=markup
Dave Hoover
http://redsquirrel.com/dave/
http://obtiva.com/
From forum-watir-users at openqa.org Mon Dec 4 10:18:08 2006
From: forum-watir-users at openqa.org (Nathan)
Date: Mon, 04 Dec 2006 09:18:08 CST
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To:
Message-ID: <55243675.1165245567020.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Hey Angrez,
The problems I experienced were resolved on my own part. First of all the install javascript that you provided in your jsss.xpi.zip file doesn't work on my system, for whatever reason. Also in your installation document you describe installing the jssh.xpi through the Firefox extension installer, but because the plugin isn't in xpi format, it is not installable this way or something else is wrong. I tried dragging the zip over and nothing. Just wanted to let you know. I resolved the problems by unzipping the file and dragging the chrome and other folder (can't remember at the moment what it was called) into my installation directory, and Firewatir works fine. It fails on one unittest but I bet you knew that. Anyway we are now looking into both firewatir and selenium rc. Both provide good solutions for what we want. It will take some time for us to refactor our code to work with either of them as we utilize native ole methods in many cases to control things like sizing the browser, positioning the browser, and getting its hwnd. Thanks for the link.
Nathan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5549&messageID=15614#15614
From forum-watir-users at openqa.org Mon Dec 4 11:32:24 2006
From: forum-watir-users at openqa.org (George)
Date: Mon, 04 Dec 2006 10:32:24 CST
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To: <55243675.1165245567020.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <55876853.1165250065989.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
>> Also in your installation document you describe installing the jssh.xpi through the Firefox extension installer, but because the plugin isn't in xpi format, it is not installable this way or something else is wrong.
I've just installed Firewatir on two XP systems, following the instructions in the installation doc, and both worked fine - except that the unit tests didn't complete. This is the error:
1) Failure:
test_simply_attach_to_new_window(TC_NewWindow) [./unittests/attach_to_new_window_test.rb:17]:
is not true.
127 tests, 699 assertions, 1 failures, 0 errors
By the way, has anyone looked into doing an Operawatir?
George
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5549&messageID=15616#15616
From forum-watir-users at openqa.org Mon Dec 4 12:38:17 2006
From: forum-watir-users at openqa.org (Jim Colo)
Date: Mon, 04 Dec 2006 11:38:17 CST
Subject: [Wtr-general] Problems running any Watir tests
Message-ID: <60085481.1165253937584.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
I have Ruby (185-21.exe) and Watir (1.4.1.exe) installed. Unsure of the installation order but Watir was probably installed first. No tests are running.
Example:
C:\watir\unittests>all_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:/watir/unittests/../unittests/setup.rb:4
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:/watir/unittests/all_tests.rb:4
Questions:
- Do I need to run "gem install watir"?
- Should I uninstall all and reinstall Ruby first?
Thanks!
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5603&messageID=15621#15621
From ajahns at gmail.com Mon Dec 4 15:25:40 2006
From: ajahns at gmail.com (Alan Jahns)
Date: Mon, 4 Dec 2006 12:25:40 -0800
Subject: [Wtr-general] Set focus to original window
In-Reply-To: <4570F7B5.70700@tejasconsulting.com>
References: <11ab23860612011816w615c0df1l90de8cfdc2a62774@mail.gmail.com>
<4570F7B5.70700@tejasconsulting.com>
Message-ID: <11ab23860612041225v7526f3f6g1997cfd21f660698@mail.gmail.com>
I tried it at first with "ie" for both but then relized that mistake and
changed it to "ie2" for the new window.
Do I have to I have to use attach to shift focus back to the first window?
Could it be that since after submitting the log in credentials the 2nd
window closes and the first window takes a few secs to reload?
Here is the script, its small so I think its ok to put it up here:
ie1 = Watir::IE.new
ie1.goto(test_site)
ie1.link(:text, "Sign in").click #this click causes the new window to
come up
# logging in to new pop up window
ie2 = Watir::IE.attach(:url, 'http://www.*******.com/check?signin=true')
ie2.text_field(:index, 2).set("funkenstein")
ie2.text_field(:index, 3).set("1212")
ie2.checkbox(:name, "savepassword").clear
ie2.button(:value, "Sign In").click
NOTE: script just goes to the ELSE statement without giving the first
page a chance to reload and display login verification
#verify user is signed in
if ie1.contains_text("You are signed in as")
puts "Test PASSED. Found the test string: You are signed in as"
else
puts "Test FAILED! Could not find: 'You are signed in as'"
end
Thanks,
Alan Jahns
On 12/1/06, Danny Faught wrote:
>
> Alan Jahns wrote:
> > I have some simple if/else statements to check
> > if some text strings are on the original window, but it seems that it no
> > longer sees the original window. How would I make watir switch focus
> back?
>
> One likely mistake is to use the same variable, like "ie", for both the
> parent and the child window. Make sure to use separate variables for
> each window that you want to keep track of.
>
> -Danny
> _______________________________________________
> 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/20061204/078e627c/attachment.html
From faught at tejasconsulting.com Mon Dec 4 15:43:27 2006
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Mon, 04 Dec 2006 14:43:27 -0600
Subject: [Wtr-general] Set focus to original window
In-Reply-To: <11ab23860612041225v7526f3f6g1997cfd21f660698@mail.gmail.com>
Message-ID:
On 12/4/2006, "Alan Jahns" wrote:
>Could it be that since after submitting the log in credentials the 2nd
>window closes and the first window takes a few secs to reload?
Yes, I think that's probably the problem - your code has a race
condition. There is a wait function that you normally don't have to
call directly, because after an action that you'd want to wait for it
to finish, Watir calls it for you. But in this case, since you have one
window causing a change in another window, you'd have to take care of
the synchronization yourself.
Even if you wait until the page finished loading, there's still a race
condition, because there's a chance (probably a small one) that you'd
call wait before the first page even begins to reload, and the wait
would return immediately because it's not loading anything yet. So in
addition to the wait, I would recommend putting your "You are signed in
as" test in a loop, so it tries several times over the course of
several seconds before giving up.
I'm not a seasoned Watir developer yet, but hopefully I've hit on the
issue here. By the way, I don't think that "focus" is what you're
looking for. Unlike many GUI test tools, in many cases IE doesn't
actually need focus or to be in the foreground in order for Watir to
work. I'd imagine that focus would be something you'd have to worry
about if you use Watir's generic GUI automation, though.
-Danny
From ajahns at gmail.com Mon Dec 4 16:10:13 2006
From: ajahns at gmail.com (Alan Jahns)
Date: Mon, 4 Dec 2006 13:10:13 -0800
Subject: [Wtr-general] Set focus to original window
In-Reply-To:
References: <11ab23860612041225v7526f3f6g1997cfd21f660698@mail.gmail.com>
Message-ID: <11ab23860612041310j565eb334ne8afb1f60dc3d32e@mail.gmail.com>
Well thanks a lot, you led me to the fix. It does seem to be a timing
problem, I started googling to figure out how to do a loop as you suggested
and while doing that found the sleep command, so I tried something like:
ie2.button(:value, "Sign In").click
# take a nap to wait for first page to load
sleep(25)
and that did the trick, I've added a check to verify the username on the
parent page and it picks it up. I'll continue to look for a more robust
solution but this will have the script working in the meantime.
Thanks!
Alan Jahns
On 12/4/06, Danny R. Faught wrote:
>
> On 12/4/2006, "Alan Jahns" wrote:
> >Could it be that since after submitting the log in credentials the 2nd
> >window closes and the first window takes a few secs to reload?
>
> Yes, I think that's probably the problem - your code has a race
> condition. There is a wait function that you normally don't have to
> call directly, because after an action that you'd want to wait for it
> to finish, Watir calls it for you. But in this case, since you have one
> window causing a change in another window, you'd have to take care of
> the synchronization yourself.
>
> Even if you wait until the page finished loading, there's still a race
> condition, because there's a chance (probably a small one) that you'd
> call wait before the first page even begins to reload, and the wait
> would return immediately because it's not loading anything yet. So in
> addition to the wait, I would recommend putting your "You are signed in
> as" test in a loop, so it tries several times over the course of
> several seconds before giving up.
>
> I'm not a seasoned Watir developer yet, but hopefully I've hit on the
> issue here. By the way, I don't think that "focus" is what you're
> looking for. Unlike many GUI test tools, in many cases IE doesn't
> actually need focus or to be in the foreground in order for Watir to
> work. I'd imagine that focus would be something you'd have to worry
> about if you use Watir's generic GUI automation, though.
>
> -Danny
> _______________________________________________
> 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/20061204/cd173114/attachment.html
From faught at tejasconsulting.com Mon Dec 4 16:39:09 2006
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Mon, 04 Dec 2006 15:39:09 -0600
Subject: [Wtr-general] Set focus to original window
In-Reply-To: <11ab23860612041310j565eb334ne8afb1f60dc3d32e@mail.gmail.com>
Message-ID:
On 12/4/2006, "Alan Jahns" wrote:
>Well thanks a lot, you led me to the fix. It does seem to be a timing
>problem, I started googling to figure out how to do a loop as you suggested
>and while doing that found the sleep command, so I tried something like:
>
>ie2.button(:value, "Sign In").click
> # take a nap to wait for first page to load
> sleep(25)
I was hoping you wouldn't find that. :-) The hacker in me wants to
point out that using sleeps to synchronize are both too slow and still
don't technically remove the race condition.
But the engineer in me says, hey, great, that will probably work in most
or all of the cases you need it for, and the slower it is, the more
likely it'll work.
You pick which one you want to listen to. :-) Here's pseudocode for
how I would approach it -
..child window initiates content change in parent window
found = 0
for i in 1..10
ie.wait
if desired content found in parent
found = 1
break
end
end
if found == 1
hurrah!
-Danny
From faught at tejasconsulting.com Mon Dec 4 17:33:23 2006
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Mon, 04 Dec 2006 16:33:23 -0600
Subject: [Wtr-general] Checking whether images inside a table
are enabled or disabled
In-Reply-To: <55115819.1165213684310.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
On 12/4/2006, "vijay" wrote:
>T...While entering into our application, all links, other than "Instructions" and "Step 1. Details", should be disabled. ... I want to verify this with Watir. I am at a loss about how to do that.
I would recommend looping through ie.links (or the appropriate frame) and
making sure that nothing appears that's supposed to be disabled, by
matching on the link text, e.g. match using /Step [2-6]/ etc.
-Danny
From ajahns at gmail.com Mon Dec 4 17:39:50 2006
From: ajahns at gmail.com (Alan Jahns)
Date: Mon, 4 Dec 2006 14:39:50 -0800
Subject: [Wtr-general] Set focus to original window
In-Reply-To:
References: <11ab23860612041310j565eb334ne8afb1f60dc3d32e@mail.gmail.com>
Message-ID: <11ab23860612041439t380d461ch4cba77af3930d667@mail.gmail.com>
Thanks for the outline in the pseudocode, I do want to do something better
than just make it sleep, its one of those hurry up and get it to work right
now so bosses are happy, then make it work better afterwards kind of
situations.
Alan
On 12/4/06, Danny R. Faught wrote:
>
> On 12/4/2006, "Alan Jahns" wrote:
> >Well thanks a lot, you led me to the fix. It does seem to be a timing
> >problem, I started googling to figure out how to do a loop as you
> suggested
> >and while doing that found the sleep command, so I tried something like:
> >
> >ie2.button(:value, "Sign In").click
> > # take a nap to wait for first page to load
> > sleep(25)
>
> I was hoping you wouldn't find that. :-) The hacker in me wants to
> point out that using sleeps to synchronize are both too slow and still
> don't technically remove the race condition.
>
> But the engineer in me says, hey, great, that will probably work in most
> or all of the cases you need it for, and the slower it is, the more
> likely it'll work.
>
> You pick which one you want to listen to. :-) Here's pseudocode for
> how I would approach it -
>
> ..child window initiates content change in parent window
> found = 0
> for i in 1..10
> ie.wait
> if desired content found in parent
> found = 1
> break
> end
> end
> if found == 1
> hurrah!
>
> -Danny
> _______________________________________________
> 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/20061204/d04844d8/attachment-0001.html
From charley.baker at gmail.com Mon Dec 4 17:53:11 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Mon, 4 Dec 2006 15:53:11 -0700
Subject: [Wtr-general] Checking whether images inside a table are
enabled or disabled
In-Reply-To:
References: <55115819.1165213684310.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
You can also take a look at the user contributions for a way to extend
Watir, this method checks for visibility:
http://wiki.openqa.org/pages/viewpage.action?pageId=1119
-Charley
On 12/4/06, Danny R. Faught wrote:
>
> On 12/4/2006, "vijay" wrote:
> >T...While entering into our application, all links, other than
> "Instructions" and "Step 1. Details", should be disabled. ... I want to
> verify this with Watir. I am at a loss about how to do that.
>
> I would recommend looping through ie.links (or the appropriate frame) and
> making sure that nothing appears that's supposed to be disabled, by
> matching on the link text, e.g. match using /Step [2-6]/ etc.
>
> -Danny
> _______________________________________________
> 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/20061204/fb3c11b4/attachment.html
From paul.rogers at shaw.ca Mon Dec 4 17:58:15 2006
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Mon, 04 Dec 2006 15:58:15 -0700
Subject: [Wtr-general] Checking whether images inside a table
are enabled or disabled
In-Reply-To:
References: <55115819.1165213684310.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
but are they really disabled links, or just text that happens to look like a link to maintain the appearance of the page?
-------------- next part --------------
You can also take a look at the user contributions for a way to extend
Watir, this method checks for visibility:
http://wiki.openqa.org/pages/viewpage.action?pageId=1119
-Charley
On 12/4/06, Danny R. Faught wrote:
>
> On 12/4/2006, "vijay" wrote:
> >T...While entering into our application, all links, other than
> "Instructions" and "Step 1. Details", should be disabled. ... I want to
> verify this with Watir. I am at a loss about how to do that.
>
> I would recommend looping through ie.links (or the appropriate frame) and
> making sure that nothing appears that's supposed to be disabled, by
> matching on the link text, e.g. match using /Step [2-6]/ etc.
>
> -Danny
> _______________________________________________
> 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/20061204/15cc3d18/attachment.html
-------------- next part --------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From forum-watir-users at openqa.org Mon Dec 4 19:34:57 2006
From: forum-watir-users at openqa.org (Jim Colo)
Date: Mon, 04 Dec 2006 18:34:57 CST
Subject: [Wtr-general] Problems running any Watir tests
In-Reply-To: <60085481.1165253937584.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <45250050.1165278927141.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Run: gem install watir
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5603&messageID=15641#15641
From angrez at gmail.com Tue Dec 5 00:27:21 2006
From: angrez at gmail.com (Angrez Singh)
Date: Tue, 5 Dec 2006 10:57:21 +0530
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To: <55876853.1165250065989.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <55243675.1165245567020.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
<55876853.1165250065989.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
Hi George,
The error that you are facing is because Firefox is not opening a new
window; instead its opening a new tab. Or Firefox is blocking the pop up.
Run the test alone and you'll be able to find out the cause.
Will document this thing so that people do this before running the test
cases.
Your comments/suggestions will be really appreciated.
Regards,
Angrez
On 12/4/06, George wrote:
>
> >> Also in your installation document you describe installing the jssh.xpithrough the Firefox extension installer, but because the plugin isn't in xpi
> format, it is not installable this way or something else is wrong.
>
> I've just installed Firewatir on two XP systems, following the
> instructions in the installation doc, and both worked fine - except that the
> unit tests didn't complete. This is the error:
>
> 1) Failure:
> test_simply_attach_to_new_window(TC_NewWindow)
> [./unittests/attach_to_new_window_test.rb:17]:
> is not true.
>
> 127 tests, 699 assertions, 1 failures, 0 errors
>
> By the way, has anyone looked into doing an Operawatir?
>
> George
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5549&messageID=15616#15616
> _______________________________________________
> 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/20061205/d9ccab4e/attachment.html
From angrez at gmail.com Tue Dec 5 00:34:44 2006
From: angrez at gmail.com (Angrez Singh)
Date: Tue, 5 Dec 2006 11:04:44 +0530
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To: <55243675.1165245567020.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References:
<55243675.1165245567020.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
Hi Nathan,
If you have downloaded the xpi from
http://people.mozilla.com/~davel/jssh/then it would save it as .zip
you need to manually change the extension to
.xpi and then follow the installation instructions for XPI. If you have
downloaded from
http://code.google.com/p/firewatir/trunk/Installation/JSShxpi/ then it
shouldn't be a problem.
I'll document this also. Are there any other problems that you are facing
Firewatir? Your feedback/suggestions are welcomed.
Regards,
Angrez
On 12/4/06, Nathan wrote:
>
> Hey Angrez,
>
> The problems I experienced were resolved on my own part. First of all the
> install javascript that you provided in your jsss.xpi.zip file doesn't
> work on my system, for whatever reason. Also in your installation document
> you describe installing the jssh.xpi through the Firefox extension
> installer, but because the plugin isn't in xpi format, it is not installable
> this way or something else is wrong. I tried dragging the zip over and
> nothing. Just wanted to let you know. I resolved the problems by unzipping
> the file and dragging the chrome and other folder (can't remember at the
> moment what it was called) into my installation directory, and Firewatir
> works fine. It fails on one unittest but I bet you knew that. Anyway we
> are now looking into both firewatir and selenium rc. Both provide good
> solutions for what we want. It will take some time for us to refactor our
> code to work with either of them as we utilize native ole methods in many
> cases to control things like sizin
> g the browser, positioning the browser, and getting its hwnd. Thanks for
> the link.
>
> Nathan
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5549&messageID=15614#15614
> _______________________________________________
> 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/20061205/e3790abe/attachment.html
From zeljko.filipin at gmail.com Tue Dec 5 02:15:43 2006
From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=)
Date: Tue, 5 Dec 2006 08:15:43 +0100
Subject: [Wtr-general] Problems running any Watir tests
In-Reply-To: <60085481.1165253937584.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <60085481.1165253937584.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
On 12/4/06, Jim Colo wrote:
>
> - Do I need to run "gem install watir"?
> - Should I uninstall all and reinstall Ruby first?
Yes, reinstall ruby and then type "gem install watir" in command prompt.
--
Zeljko Filipin
zeljkofilipin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061205/83d561d4/attachment.html
From forum-watir-users at openqa.org Tue Dec 5 03:12:19 2006
From: forum-watir-users at openqa.org (Ankur Gupta)
Date: Tue, 05 Dec 2006 02:12:19 CST
Subject: [Wtr-general] Click on a pixel location
Message-ID: <43344480.1165306369578.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Using watir is it possible to click on a location that can be specified with x and y coordinate (pixels)
I am trying to automate JD Edwards screens using Watir, i am stuck at a portion where the object is not being identified. The textbox which i have to type also cant be reached by using Keyboard Tab.
Any other workarounds?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5614&messageID=15651#15651
From forum-watir-users at openqa.org Tue Dec 5 04:36:50 2006
From: forum-watir-users at openqa.org (George)
Date: Tue, 05 Dec 2006 03:36:50 CST
Subject: [Wtr-general] I want to use Watir to test Firefox and Safari
In-Reply-To:
Message-ID: <43817165.1165311440382.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
>> Or Firefox is blocking the pop up.
Thanks Angrez, that was my problem. All the tests pass now.
George
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5549&messageID=15657#15657
From forum-watir-users at openqa.org Tue Dec 5 06:40:34 2006
From: forum-watir-users at openqa.org (Fletch)
Date: Tue, 05 Dec 2006 05:40:34 CST
Subject: [Wtr-general] Excel Or Text File?
Message-ID: <47102279.1165318864440.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Hello Again,
I have currently got a WATIR Script running, and use a text file to hold all the constants.
However I have had a request to change this text file to a Spreadsheet - does it make sense to use a spreadsheet to hold all the constants? From what I have seen, I would have to call the cell directly, rather than being able to give the field a proper and relevant name.
Thanks for any advice you can give me,
PMF.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5619&messageID=15669#15669
From forum-watir-users at openqa.org Tue Dec 5 09:34:50 2006
From: forum-watir-users at openqa.org (vijay)
Date: Tue, 05 Dec 2006 08:34:50 CST
Subject: [Wtr-general] "abnormal program termination" error
message while playing back a script
In-Reply-To:
Message-ID: <41033281.1165329320743.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Thanks Charley for your info. Now I have installed Ruby 1.82 (from the RubyForge site) after uninstalling Ruby 1.85. But now I am unable to install a watir gem. With Ruby 1.85, I would go to the directory where the gem (say 1.5.1.1127) was downloaded and type "gem install watir-1[1].5.1.1127.gem" (watir-1[1].5.1.1127.gem is the name of the gem file) to install the gem. But now, when I try to install the 1127 gem in the same way, I get an error message saying, "watir-1[1].5.1.1127.gem". Is this not the way that a watir gem should be installed over Ruby 1.82? Can you guide me on how to install 1127 gem over Ruby 1.82?
Many thanks,
Vijay.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5509&messageID=15673#15673
From zeljko.filipin at gmail.com Tue Dec 5 10:08:33 2006
From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=)
Date: Tue, 5 Dec 2006 16:08:33 +0100
Subject: [Wtr-general] "abnormal program termination" error message
while playing back a script
In-Reply-To: <41033281.1165329320743.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References:
<41033281.1165329320743.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
On 12/5/06, vijay wrote:
>
> Can you guide me on how to install 1127 gem over Ruby 1.82?
>
Download watir gem to any folder. Open command prompt and go to that folder.
Type
gem install watir
Make sure that gem name is watir-1.5.1.1127.gem (not
watir-1[1].5.1.1127.gem).
--
Zeljko Filipin
zeljkofilipin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061205/3572a569/attachment.html
From charley.baker at gmail.com Tue Dec 5 10:53:13 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Tue, 5 Dec 2006 08:53:13 -0700
Subject: [Wtr-general] Excel Or Text File?
In-Reply-To: <47102279.1165318864440.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <47102279.1165318864440.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
Here's an excellent page on scripting Excel through Ruby:
http://wiki.rubygarden.org/Ruby/page/show/ScriptingExcel
You could have a column with your constants and the next column over be the
values and iterate through the rows assigning those to a constant Hash or
something of the sort. There are a variety of ways to set up your constants,
you really shouldn't be losing any flexibility, it might just be a matter of
reorganizing.
-Charley
On 12/5/06, Fletch wrote:
>
> Hello Again,
>
> I have currently got a WATIR Script running, and use a text file to hold
> all the constants.
> However I have had a request to change this text file to a Spreadsheet -
> does it make sense to use a spreadsheet to hold all the constants? From what
> I have seen, I would have to call the cell directly, rather than being able
> to give the field a proper and relevant name.
>
> Thanks for any advice you can give me,
>
> PMF.
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5619&messageID=15669#15669
> _______________________________________________
> 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/20061205/2b044d7b/attachment.html
From faught at tejasconsulting.com Tue Dec 5 11:40:36 2006
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Tue, 05 Dec 2006 10:40:36 -0600
Subject: [Wtr-general] "abnormal program termination" error
message while playing back a script
In-Reply-To: <41033281.1165329320743.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
On 12/5/2006, "vijay" wrote:
>Thanks Charley for your info. Now I have installed Ruby 1.82 (from the RubyForge site) after uninstalling Ruby 1.85.
Thanks from me too. I'm now running Watir with Ruby 1.8.2 on XP
Embedded, and showing how much slower this supposed "thin client"
application is on slow hardware. :-) Who needs a load test tool when a
single user already can't get good performance.
-Danny
From lisa.crispin at gmail.com Tue Dec 5 15:58:25 2006
From: lisa.crispin at gmail.com (Lisa Crispin)
Date: Tue, 5 Dec 2006 13:58:25 -0700
Subject: [Wtr-general] Windows Vista / IE 7 "RPC Server is Unavailable"
Message-ID: <63915d6a0612051258j464b2154t2909af171b812f79@mail.gmail.com>
Hi,
I've searched the mailing list for this error but I'm not finding much that
helps me. Admittedly, I am over my head with this.
We have customers using IE7 so we'd like to run Watir tests on IE7. We set
up a machine with Windows Vista and IE7 (Why Windows Vista? Just because it
was there, I guess). I installed Ruby 1.8.5 with the one click installer
and used gem to install Watir 1.4.1. I can attach to an IE window fine with
irb and click buttons and so on in irb. However, the scripts fail with
errors like the ones below. They invoke the site URL fine, but then another
window seems to be trying to open, just hanging. When I close it, I get the
errors below. We tried turning off the tabs in IE7, that didn't help.
I tried some troubleshooting I found for older versions of windows with the
RPC Server error but nothing helps. I can manually use the app just fine
from this machine with IE7. We have other Windows machines set up the same
way as this one network-wise but they are XP.
Is anyone else using Windows Vista? The only problem I've seen on this
mailing list for IE7 is the modal dialog popup title being different. We
are not getting anywhere close to our modal dialog popups! The scripts
can't seem to click anything once they invoke the site (although I can do
it with irb).
Thanks
Lisa
EE
Finished in 84.735 seconds.
1) Error:
test_login(TC_Login):
WIN32OLERuntimeError: unknown property or method `document'
HRESULT error code:0x800706ba
The RPC server is unavailable.
c:/ruby/lib/ruby/gems/1.8/gems/watir- 1.4.1/./watir.rb:1336:in
`method_missin
g'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1336:in `document'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:899:in `getLink'
c:/ruby/lib/ruby/gems/1.8/gems/watir- 1.4.1/./watir.rb:2830:in
`initialize'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:570:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:570:in `link'
C:/Java/workspace/eplan/src/watir/scripts/simple/Login/../../../lib/Login/lo
gin.rb:56:in `login'
C:/Java/workspace/eplan/src/watir/scripts/simple/Login/../../../lib/Login/lo
gin.rb:78:in `fast401k_login'
C:/Java/workspace/eplan/src/watir/scripts/simple/Login/tc_login.rb:109:in `t
est_login'
2) Error:
test_login(TC_Login):
WIN32OLERuntimeError: unknown property or method `hWnd'
HRESULT error code:0x800706ba
The RPC server is unavailable.
C:/Java/workspace/eplan/src/watir/scripts/simple/Login/../../../lib/Utility/
ie_tools.rb:10:in `method_missing'
C:/Java/workspace/eplan/src/watir/scripts/simple/Login/../../../lib/Utility/
ie_tools.rb:10:in `stop_ie'
C:/Java/workspace/eplan/src/watir/scripts/simple/Login/tc_login.rb:115:in `t
eardown'
1 tests, 0 assertions, 0 failures, 2 errors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061205/f1202a47/attachment.html
From forum-watir-users at openqa.org Tue Dec 5 16:06:01 2006
From: forum-watir-users at openqa.org (John Lolis)
Date: Tue, 05 Dec 2006 15:06:01 CST
Subject: [Wtr-general] Excel Or Text File?
In-Reply-To: <47102279.1165318864440.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <36169008.1165352791358.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
If these are just a couple of simple constants why not make it a ruby file? require a file somewhere in your scripts and do something like
$name = 'name'
$password = 'password'
$url = 'url'
its easy to figure out, and no need to parse anything.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5619&messageID=15692#15692
From forum-watir-users at openqa.org Wed Dec 6 04:11:47 2006
From: forum-watir-users at openqa.org (san)
Date: Wed, 06 Dec 2006 03:11:47 CST
Subject: [Wtr-general] Can Watir Open Pages Containing Only PDF Link?
Message-ID: <48680086.1165396337443.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
I Tried This....
ie = Watir::IE.start('http://www.surgeongeneral.gov/tobacco/smconsumr.pdf')
But Adobe Reader v8 Pops Up And Says "You Can't View PDF File In A web Browser" or Something Like That.
So Is There Any Solution To Open These Links & Save The PDF?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5633&messageID=15706#15706
From forum-watir-users at openqa.org Wed Dec 6 06:14:28 2006
From: forum-watir-users at openqa.org (san)
Date: Wed, 06 Dec 2006 05:14:28 CST
Subject: [Wtr-general] How To Manage Cookies?
Message-ID: <63370846.1165403698960.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Well I Don't Know How To Access Cookies In Watir, Searched A Lot But No Result... Can Someone Help Me With Some Codes To Access & Fetch Informations Within Cookies, Such As The URL, Name etc Of The Cookie... Is There Any Kind Of Tutorial?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5635&messageID=15709#15709
From forum-watir-users at openqa.org Wed Dec 6 06:21:58 2006
From: forum-watir-users at openqa.org (Dhamodharan)
Date: Wed, 06 Dec 2006 05:21:58 CST
Subject: [Wtr-general] Can anyone solve this problem..???????
Message-ID: <46166959.1165404148397.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
# you were trying to use an undefined local variable in your test method
# here is an example that uses an instance variable for IE
# the test runs, but fails -- I don't know what you are looking for :-)
require 'watir'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
class TC_Fields < Test::Unit::TestCase
include Watir
def setup
puts "Set URL variable"
test_site = 'http://www.yahoo.com'
puts "Start New Browser"
@ie = IE.new
puts "Setup: go to the test site: " + test_site
@ie.goto(test_site)
#puts "Assertion Test in Position A"
#assert(@ie.text_field(:id, "v1").exists?)
end
def test1
puts "Assertion Test in Position B"
assert(@ie.text_field(:id, "v1").exists?)
end
end
------------------------------------------------------------------------------
Hi i got thi error ..
Can anyone solve this ..
Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test Started
Set URL variable Start New Browser
Setup: go to the test site: http://www.yahoo.com Assertion Test in Position
B E Finished in 1.082 seconds.
1) Error:
test1(TC_Fields):
NameError: undefined local variable or method `ie' for
#
C:/Apps/PowerSeller Test Scripts/carl_textfields_test.rb:33:in `test1'
1 tests, 0 assertions, 0 failures, 1 errors
My gut is telling me it is something with my development environment. If
someone has a moment please copy and execute this script in your
environment.
thanks and regards ,
M.Dhamodharan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5636&messageID=15712#15712
From mail at chriss-baumann.de Wed Dec 6 06:35:31 2006
From: mail at chriss-baumann.de (Christian Baumann)
Date: Wed, 06 Dec 2006 12:35:31 +0100
Subject: [Wtr-general] How To Manage Cookies?
In-Reply-To: <63370846.1165403698960.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <63370846.1165403698960.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <4576AB03.3030204@chriss-baumann.de>
Hello san,
maybe the "cookie manager" mentioned here may help You:
http://www.mail-archive.com/wtr-general at rubyforge.org/msg05595.html
Other suggestion: Cookies are simple textfiles, why don?t You handle
them with the normal ruby-functionalities?
Regards,
Christian
san schrieb:
> Well I Don't Know How To Access Cookies In Watir, Searched A Lot But No Result... Can Someone Help Me With Some Codes To Access & Fetch Informations Within Cookies, Such As The URL, Name etc Of The Cookie... Is There Any Kind Of Tutorial?
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5635&messageID=15709#15709
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
From forum-watir-users at openqa.org Wed Dec 6 06:42:33 2006
From: forum-watir-users at openqa.org (san)
Date: Wed, 06 Dec 2006 05:42:33 CST
Subject: [Wtr-general] Can Watir Open Pages Containing Only PDF Link?
In-Reply-To: <48680086.1165396337443.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <63395010.1165405383384.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Ooooops My Mistake... Adobe Was Not Properly Installed...Sorry. :)
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5633&messageID=15715#15715
From forum-watir-users at openqa.org Wed Dec 6 07:20:56 2006
From: forum-watir-users at openqa.org (vijay)
Date: Wed, 06 Dec 2006 06:20:56 CST
Subject: [Wtr-general] Error while calling a function in Watir 1.5
Message-ID: <60591876.1165407686457.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Hello people,
I have written a small function to check for the presence or absence of a few values within a table. Sometimes, Watir executes the function properly and gives the intended output (telling whether those values are present or not). But, at times, it is throwing one of the following error messages (after giving a few lines of output):
1. "Ruby.exe has generated errors and will be closed by windows. You will need to restart the program" in a small window with a title "Program Error"
2. [Bug] Segmentation Fault
3. Abnormal Program Termination
I am using Ruby 1.85 and Watir gem 1.5.1.1127.
Previuosly, when I told about the first error in a different message, Charley Baker told me to use Ruby 1.82 instead of 1.85. Are all the three error messages caused due to Ruby 1.85 or there could be a problem with my code (the function is a straight-forward function with little complications)?. Also I am unable to install Watir gem 1.5.1.1127 over Ruby 1.82. After uninstalling Ruby 1.85 and installing Ruby 1.82, when I give the command, "gem install watir 1.5.1.1127.gem" or "gem install watir" in the command prompt, Windows is giving out an error message saying, "gem is not a recognizable command or a batch file" (the error message that comes when we type in a non-existant command in DOS). Does "gem" needs to be installed separately before using the command "gem install..."? I used to install Watir 1.5.1.1127 over Ruby 1.85 in the above-mentioned way and it perfectly installs the Watir gem.
Please help me.
Thanks,
Vijay.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5638&messageID=15717#15717
From forum-watir-users at openqa.org Wed Dec 6 07:23:36 2006
From: forum-watir-users at openqa.org (vijay)
Date: Wed, 06 Dec 2006 06:23:36 CST
Subject: [Wtr-general] "abnormal program termination" error
message while playing back a script
In-Reply-To:
Message-ID: <50937882.1165407846865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
I am still unable to install Watir gem 1.5.1.1127 over Ruby 1.82. After uninstalling Ruby 1.85 and installing Ruby 1.82, when I give the command, "gem install watir 1.5.1.1127.gem" or "gem install watir" in the folder where the watir gem was downloaded, Windows is giving out an error message saying, "gem is not a recognizable command or a batch file" (the error message that comes when we type in a non-existant command in DOS). Does "gem" needs to be installed separately before using the command "gem install..."? I used to install Watir 1.5.1.1127 over Ruby 1.85 in the above-mentioned way and it perfectly installs the Watir gem.
Thanks,
Vijay.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5509&messageID=15718#15718
From forum-watir-users at openqa.org Wed Dec 6 07:31:14 2006
From: forum-watir-users at openqa.org (Udo Fröhling)
Date: Wed, 06 Dec 2006 06:31:14 CST
Subject: [Wtr-general] Error while calling a function in Watir 1.5
In-Reply-To: <60591876.1165407686457.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <56997883.1165408304940.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
> Previuosly, when I told about the first error in a
> different message, Charley Baker told me to use Ruby
> 1.82 instead of 1.85.
I agree with that, my segementation faults are gone since i downdated to 1.82
Udo
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5638&messageID=15720#15720
From forum-watir-users at openqa.org Wed Dec 6 08:08:01 2006
From: forum-watir-users at openqa.org (vijay)
Date: Wed, 06 Dec 2006 07:08:01 CST
Subject: [Wtr-general] Error while calling a function in Watir 1.5
In-Reply-To: <56997883.1165408304940.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <45625459.1165410511153.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Good to hear it. But do you know how to install Watir 1.5.1.1127.gem over Ruby 1.82. When I give the command "gem install Watir-1.5.1.1127" in the folder where the gem was downloaded to, Windows says "gem is not a recognizable command or a batch file" (the error message that comes when a wrong command is keyed in DOS)
Thanks,
Vijay
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5638&messageID=15722#15722
From esjewett at gmail.com Wed Dec 6 09:11:24 2006
From: esjewett at gmail.com (Ethan Jewett)
Date: Wed, 6 Dec 2006 08:11:24 -0600
Subject: [Wtr-general] "abnormal program termination" error message
while playing back a script
In-Reply-To: <50937882.1165407846865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References:
<50937882.1165407846865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <68f4a0e80612060611k2b1ffc08je5f4913629f234e1@mail.gmail.com>
Vijay,
Gem should be in whatever folder Ruby is in. It sounds like the
ruby/bin/ folder is not in your path.
At the command prompt, you can't run "gem" or "ruby -h". Can you run
these commands with their full paths, like "C:\ruby\bin\gem"?
Ethan
On 12/6/06, vijay wrote:
> I am still unable to install Watir gem 1.5.1.1127 over Ruby 1.82. After uninstalling Ruby 1.85 and installing Ruby 1.82, when I give the command, "gem install watir 1.5.1.1127.gem" or "gem install watir" in the folder where the watir gem was downloaded, Windows is giving out an error message saying, "gem is not a recognizable command or a batch file" (the error message that comes when we type in a non-existant command in DOS). Does "gem" needs to be installed separately before using the command "gem install..."? I used to install Watir 1.5.1.1127 over Ruby 1.85 in the above-mentioned way and it perfectly installs the Watir gem.
>
> Thanks,
> Vijay.
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5509&messageID=15718#15718
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From faught at tejasconsulting.com Wed Dec 6 10:14:11 2006
From: faught at tejasconsulting.com (Danny Faught)
Date: Wed, 06 Dec 2006 08:14:11 -0700
Subject: [Wtr-general] "abnormal program termination"
error message while playing back a script
In-Reply-To: <50937882.1165407846865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <50937882.1165407846865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <4576DE43.5030507@tejasconsulting.com>
vijay wrote:
> I am still unable to install Watir gem 1.5.1.1127 over Ruby 1.82. After uninstalling Ruby 1.85 and installing Ruby 1.82, when I give the command, "gem install watir 1.5.1.1127.gem" or "gem install watir" in the folder where the watir gem was downloaded, Windows is giving out an error message saying, "gem is not a recognizable command or a batch file" (the error message that comes when we type in a non-existant command in DOS).
The most common cause for this error is that c:\ruby\bin is not in your
PATH environment variable. Try starting a new DOS shell, and that
should pick up the environment that was set up by the latest Ruby install.
You can also try typing the full path - c:\ruby\bin\gem if I remember
correctly (I'm on Linux at the moment), or c:/ruby/bin/gem.bat under Cygwin.
-Danny
From forum-watir-users at openqa.org Wed Dec 6 10:08:43 2006
From: forum-watir-users at openqa.org (Nathan)
Date: Wed, 06 Dec 2006 09:08:43 CST
Subject: [Wtr-general] Can anyone solve this problem..???????
In-Reply-To: <46166959.1165404148397.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <59038162.1165417780781.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Yeah, the reason why you're having that error is that you have only defined @ie in your first method. That makes that a local instance to that method. Because of this, when you try and use it in your second method it returns nil or in your case 'undefined'. If you want to use the @ie variable globally then you might do one of two things. 1) Define the variable outside of your methods but inside of your class as a class variable or member that can be accessed by all of your methods, or 2) define @ie as a global variable (I'm not sure if you can keep the '@' part in this case) by calling it $ie. The $ tells Ruby to treat the variable like a global variable no matter where you define it.
Nathan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5636&messageID=15734#15734
From forum-watir-users at openqa.org Wed Dec 6 10:19:30 2006
From: forum-watir-users at openqa.org (vijay)
Date: Wed, 06 Dec 2006 09:19:30 CST
Subject: [Wtr-general] "abnormal program termination"
error message while playing back a script
In-Reply-To: <4576DE43.5030507@tejasconsulting.com>
Message-ID: <56314063.1165418400226.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Thanks everyone for your help. I put the watir gem in the 'C:\ruby\bin' folder and installed watir from there. Now the function, which used to throw a series of error messages like "Program error - ruby.exe has created problems, segmentation fault and abnormal program termination, seems to run properly and give the intended output.
Thanks, once again. That was a great help.
Vijay
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5509&messageID=15735#15735
From forum-watir-users at openqa.org Wed Dec 6 10:21:27 2006
From: forum-watir-users at openqa.org (vijay)
Date: Wed, 06 Dec 2006 09:21:27 CST
Subject: [Wtr-general] Error while calling a function in Watir 1.5
In-Reply-To: <45625459.1165410511153.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <40850461.1165418517814.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Thanks Charley and Udof for your help. After installing Ruby 1.82, I put the watir gem in the 'C:\ruby\bin' folder and installed watir from there. Now the function, which used to throw a series of error messages like "Program error - ruby.exe has created problems, segmentation fault and abnormal program termination, seems to run properly and give the intended output.
Thanks, once again. That was a great help.
Vijay
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5638&messageID=15737#15737
From forum-watir-users at openqa.org Wed Dec 6 11:26:24 2006
From: forum-watir-users at openqa.org (Fletch)
Date: Wed, 06 Dec 2006 10:26:24 CST
Subject: [Wtr-general] Excel Or Text File?
In-Reply-To: <36169008.1165352791358.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <37724181.1165422414352.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
That is what I have at the minute, but I am under pressure to use a Spreadsheet. I thought that the text file was a much better and more simple idea.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5619&messageID=15745#15745
From michael.a.bolton at gmail.com Wed Dec 6 11:38:41 2006
From: michael.a.bolton at gmail.com (Michael Bolton)
Date: Wed, 6 Dec 2006 11:38:41 -0500
Subject: [Wtr-general] Excel Or Text File?
In-Reply-To: <37724181.1165422414352.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <00c201c71954$fdc100a0$6501a8c0@Koko>
Using a spreadsheet is pretty straightforward, especially for the simpler
functions, if you use the link that Charley cited earlier. Fancy stuff
requires a little more effort with the (very, very strange) Excel object
model. I've found good hints on how to do this in VB books and by using the
Object Browser (which you can get to via Excel's Tools/Macro/Edit, and then
when you're in the VB editor, hitting F2).
---Michael B.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fletch
Sent: December 6, 2006 11:26 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Excel Or Text File?
That is what I have at the minute, but I am under pressure to use a
Spreadsheet. I thought that the text file was a much better and more simple
idea.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5619&messageID=15745#15745
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From christopher.mcmahon at gmail.com Wed Dec 6 11:38:32 2006
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Wed, 6 Dec 2006 08:38:32 -0800
Subject: [Wtr-general] Excel Or Text File?
In-Reply-To: <37724181.1165422414352.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <36169008.1165352791358.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
<37724181.1165422414352.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <72799cd70612060838p6025507aj34954590182e7234@mail.gmail.com>
On 12/6/06, Fletch wrote:
>
> That is what I have at the minute, but I am under pressure to use a
> Spreadsheet. I thought that the text file was a much better and more simple
> idea.
There is a fair amount in the archives on this subject.
My own opinion is to use a spreadsheet when:
a) Stakeholders who are not in the code itself need to be made happy. This
sounds like where you are right now.
b) Data in the spreadsheet will be subject to substantial manipulation by
non-programmers.
c) Some feature of the spreadsheet software (i.e. macros) is important.
Have you considered the possibility of a delimited file that can be
manipulated by Excel? (I assume you're using Excel). A delimited file
gives you a lot of the presentation goodness of Excel, but is still easier
to program than a real Excel spreadsheet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061206/ca7c2d0f/attachment.html
From charley.baker at gmail.com Wed Dec 6 11:50:01 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Wed, 6 Dec 2006 09:50:01 -0700
Subject: [Wtr-general] Excel Or Text File?
In-Reply-To: <72799cd70612060838p6025507aj34954590182e7234@mail.gmail.com>
References: <36169008.1165352791358.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
<37724181.1165422414352.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
<72799cd70612060838p6025507aj34954590182e7234@mail.gmail.com>
Message-ID:
Chris has some salient points. Another advantage of using a delimited file
that you can use through Excel is version control. Using a delimited file
makes it easier to diff and/or merge through Subversion or whatever your SCM
tool might be as opposed to using an Excel file.
-Charley
On 12/6/06, Chris McMahon wrote:
>
>
>
> On 12/6/06, Fletch wrote:
> >
> > That is what I have at the minute, but I am under pressure to use a
> > Spreadsheet. I thought that the text file was a much better and more simple
> > idea.
>
>
> There is a fair amount in the archives on this subject.
>
> My own opinion is to use a spreadsheet when:
>
> a) Stakeholders who are not in the code itself need to be made happy.
> This sounds like where you are right now.
> b) Data in the spreadsheet will be subject to substantial manipulation by
> non-programmers.
> c) Some feature of the spreadsheet software (i.e. macros) is important.
>
> Have you considered the possibility of a delimited file that can be
> manipulated by Excel? (I assume you're using Excel). A delimited file
> gives you a lot of the presentation goodness of Excel, but is still easier
> to program than a real Excel spreadsheet.
>
>
>
>
>
> _______________________________________________
> 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/20061206/2f34ed4e/attachment.html
From faught at tejasconsulting.com Wed Dec 6 12:53:52 2006
From: faught at tejasconsulting.com (Danny Faught)
Date: Wed, 06 Dec 2006 10:53:52 -0700
Subject: [Wtr-general] Excel Or Text File?
In-Reply-To: <37724181.1165422414352.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <37724181.1165422414352.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <457703B0.2030702@tejasconsulting.com>
Fletch wrote:
> That is what I have at the minute, but I am under pressure to use a Spreadsheet. I thought that the text file was a much better and more simple idea.
A comma-delimited (comma-separated-value / csv) file is a great
compromise, as was mentioned earlier. A spreadsheet application can
read and write it, and it's a text file that's simple to parse in Ruby.
You won't get Excel features like functions and macros, but you will
get a GUI interface for non-technical people to enter flat data.
Your users will need to know that they need to save the files in .csv
format, not .xls.
-Danny
From charley.baker at gmail.com Wed Dec 6 13:17:17 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Wed, 6 Dec 2006 11:17:17 -0700
Subject: [Wtr-general] Click on a pixel location
In-Reply-To: <43344480.1165306369578.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <43344480.1165306369578.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
There are many ways to access controls, does the textbox have any
attributes? id, name, etc? If it does then you can use the standard set
method:
ie.text_field(:name, "username").set("admin")
Are you getting errors accessing it? If so what errors? If the text field
doesn't have any identifiable attributes, you can also use index:
ie.text_field(:index, 3).set("admin")
There may be a way to pixel click, but I wouldn't recommend it as it's
subject to breaking pretty quickly. The above options should work. If not,
post some of the html code and more information.
-Charley
On 12/5/06, Ankur Gupta wrote:
>
> Using watir is it possible to click on a location that can be specified
> with x and y coordinate (pixels)
>
> I am trying to automate JD Edwards screens using Watir, i am stuck at a
> portion where the object is not being identified. The textbox which i have
> to type also cant be reached by using Keyboard Tab.
>
> Any other workarounds?
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5614&messageID=15651#15651
> _______________________________________________
> 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/20061206/c3f40f80/attachment.html
From forum-watir-users at openqa.org Wed Dec 6 13:45:59 2006
From: forum-watir-users at openqa.org (Ankur Gupta)
Date: Wed, 06 Dec 2006 12:45:59 CST
Subject: [Wtr-general] Click on a pixel location
In-Reply-To: <43344480.1165306369578.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <44359413.1165430789804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
pixel click is subject to break easily and not the recommended way, but that seems to me to be the only way to go in the situation i am stuck right now :-(
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5614&messageID=15765#15765
From mail at chriss-baumann.de Wed Dec 6 13:58:48 2006
From: mail at chriss-baumann.de (Christian Baumann)
Date: Wed, 06 Dec 2006 19:58:48 +0100
Subject: [Wtr-general] Click on a pixel location
In-Reply-To: <44359413.1165430789804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <44359413.1165430789804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID: <457712E8.5010003@chriss-baumann.de>
Hi,
what about showing us Your html-code as Charley mentioned?
Regards,
Christian
Ankur Gupta schrieb:
> pixel click is subject to break easily and not the recommended way, but that seems to me to be the only way to go in the situation i am stuck right now :-(
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5614&messageID=15765#15765
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
From philipreedtech at gmail.com Wed Dec 6 14:01:22 2006
From: philipreedtech at gmail.com (philip reed)
Date: Wed, 6 Dec 2006 14:01:22 -0500
Subject: [Wtr-general] Click on a pixel location
In-Reply-To: <44359413.1165430789804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
References: <43344480.1165306369578.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
<44359413.1165430789804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
Just curious, would Watir be able to handle the following cases:
- if the form were part of a Java applet?
- if the form were generated by Javascript?
- if the form were generated by Flash?
I don't know anything about the JD Edwards app, and I know less than I
wish about Watir. Just asking to learn, but perhaps it's helpful to
brainstorm reasons why a form showing up in a somewhat standard
browser config might not be Watir-accessible....
Thanks,
Philip
On 12/6/06, Ankur Gupta wrote:
> pixel click is subject to break easily and not the recommended way, but that seems to me to be the only way to go in the situation i am stuck right now :-(
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5614&messageID=15765#15765
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
Philip Reed, Web developer
http://philipreedtech.com
Web. Made simple.
From charley.baker at gmail.com Wed Dec 6 14:03:13 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Wed, 6 Dec 2006 12:03:13 -0700
Subject: [Wtr-general] Click on a pixel location
In-Reply-To: <457712E8.5010003@chriss-baumann.de>
References: <44359413.1165430789804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
<457712E8.5010003@chriss-baumann.de>
Message-ID:
A snippet or use the IE developer toolbar to see what attributes in the
generated DOM you might have access to:
http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en
-Charley
On 12/6/06, Christian Baumann wrote:
>
> Hi,
>
> what about showing us Your html-code as Charley mentioned?
>
> Regards,
> Christian
>
>
> Ankur Gupta schrieb:
> > pixel click is subject to break easily and not the recommended way, but
> that seems to me to be the only way to go in the situation i am stuck right
> now :-(
> > ---------------------------------------------------------------------
> > Posted via Jive Forums
> > http://forums.openqa.org/thread.jspa?threadID=5614&messageID=15765#15765
> > _______________________________________________
> > 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/20061206/3f8f0068/attachment.html
From charley.baker at gmail.com Wed Dec 6 15:20:13 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Wed, 6 Dec 2006 13:20:13 -0700
Subject: [Wtr-general] Click on a pixel location
In-Reply-To:
References: <43344480.1165306369578.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
<44359413.1165430789804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
Hey Philip,
Java applet - no, Flash - no. These are embedded objects which IE really
has no insight into. Form generated by Javascript - yes. This is what Watir
deals with....the generated DOM. I'm not yet convinced there's no way to
access the form elements in this particular scenario.
-Charley
On 12/6/06, philip reed wrote:
>
> Just curious, would Watir be able to handle the following cases:
>
> - if the form were part of a Java applet?
> - if the form were generated by Javascript?
> - if the form were generated by Flash?
>
> I don't know anything about the JD Edwards app, and I know less than I
> wish about Watir. Just asking to learn, but perhaps it's helpful to
> brainstorm reasons why a form showing up in a somewhat standard
> browser config might not be Watir-accessible....
>
> Thanks,
>
> Philip
>
> On 12/6/06, Ankur Gupta wrote:
> > pixel click is subject to break easily and not the recommended way, but
> that seems to me to be the only way to go in the situation i am stuck right
> now :-(
> > ---------------------------------------------------------------------
> > Posted via Jive Forums
> > http://forums.openqa.org/thread.jspa?threadID=5614&messageID=15765#15765
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>
> --
> Philip Reed, Web developer
>
> http://philipreedtech.com
>
> Web. Made simple.
> _______________________________________________
> 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/20061206/d7da8cf0/attachment-0001.html
From paul.rogers at shaw.ca Wed Dec 6 15:27:44 2006
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Wed, 06 Dec 2006 13:27:44 -0700
Subject: [Wtr-general] Click on a pixel location
In-Reply-To:
References: <43344480.1165306369578.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
<44359413.1165430789804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
java applet - no, but might be possible with autoit or winclicker
javascript - yep - the form exists as part of the DOM, so watir can get at it
Flash - see java applet
----- Original Message -----
From: philip reed
Date: Wednesday, December 6, 2006 12:01 pm
Subject: Re: [Wtr-general] Click on a pixel location
> Just curious, would Watir be able to handle the following cases:
>
> - if the form were part of a Java applet?
> - if the form were generated by Javascript?
> - if the form were generated by Flash?
>
> I don't know anything about the JD Edwards app, and I know less
> than I
> wish about Watir. Just asking to learn, but perhaps it's helpful to
> brainstorm reasons why a form showing up in a somewhat standard
> browser config might not be Watir-accessible....
>
> Thanks,
>
> Philip
>
> On 12/6/06, Ankur Gupta wrote:
> > pixel click is subject to break easily and not the recommended
> way, but that seems to me to be the only way to go in the
> situation i am stuck right now :-(
> > -----------------------------------------------------------------
> ----
> > Posted via Jive Forums
> >
> http://forums.openqa.org/thread.jspa?threadID=5614&messageID=15765#15765> _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>
> --
> Philip Reed, Web developer
>
> http://philipreedtech.com
>
> Web. Made simple.
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From paul.rogers at shaw.ca Wed Dec 6 15:29:38 2006
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Wed, 06 Dec 2006 13:29:38 -0700
Subject: [Wtr-general] Click on a pixel location
In-Reply-To:
References: <43344480.1165306369578.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
Message-ID:
if i remember, there is a method in IE called something like
element_at( x, y)
it might be possible to use that to do what you need. But as others have said, this is a very fragile way of doing automation
Paul
-------------- next part --------------
There are many ways to access controls, does the textbox have any
attributes? id, name, etc? If it does then you can use the standard set
method:
ie.text_field(:name, "username").set("admin")
Are you getting errors accessing it? If so what errors? If the text field
doesn't have any identifiable attributes, you can also use index:
ie.text_field(:index, 3).set("admin")
There may be a way to pixel click, but I wouldn't recommend it as it's
subject to breaking pretty quickly. The above options should work. If not,
post some of the html code and more information.
-Charley
On 12/5/06, Ankur Gupta wrote:
>
> Using watir is it possible to click on a location that can be specified
> with x and y coordinate (pixels)
>
> I am trying to automate JD Edwards screens using Watir, i am stuck at a
> portion where the object is not being identified. The textbox which i have
> to type also cant be reached by using Keyboard Tab.
>
> Any other workarounds?
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5614&messageID=15651#15651
> _______________________________________________
> 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/20061206/c219a0bf/attachment.html
-------------- next part --------------
_______________________________________________
Wtr-general mailing list
Wtr-general at ru