I've got some simple thread code, included below, which will attempt to process
every file it finds in a particular directory in a new thread within my
application under test. This is essentially some very light load testing.
(Obviously I've left a lot of the code out, but there's enough to get
> Please tell me how to click a column of a row of a web page.
What exactly do you want to click?
If it's the specific hyperlink you've provided, you can do a couple of things:
ie.link(:url, /snapshot=2&treeobject=12507&object=12507/).click
ie.link(:text, "New applicationTEST2").click
... etc,
> Yes - an array - you'll figure it out ;-)
Nice. Appreciate your confidence.
Appears to do the trick:
> threads = []
> @varvar.each do |searchterm|
> threads << Thread.new {test_google(searchterm)}
> end
> threads.each {|x| x.join}
___
Wtr-general
Ahhh... maybe, just MAYBE, I should try something before I give up and post.
This appeared to work:
> require 'thread'
> require 'watir'
>
> @var1='pickaxe'
> @var2='axepick'
> @var3='pckexai'
>
> def test_google(varvar)
> ie = Watir::IE.start('http://www.google.com')
> ie.text_field(:name, "
What would you suggest for running mutiple threads, BUT each thread using
different variables. I've 'stolen' the following code from Brett (thanks!)
which does exactly as expected, BUT how would I, for instance, search for a
different value (instead of 'pickaxe') in each thread?
> require 'thr
> > ie.text_field(:after?, ie.label(:for, "confirmPassword")).flash
> What's :for? It's not part of Watir. Have you tried by :name and/or :id?
Fair point.
I originally tried it from this page:
http://wiki.openqa.org/display/WTR/Methods+supported+by+Element where it states:
> label
> ie.link(:after?, ie.image(:id, 'foo')).click
Does / can this apply to anything other than 'links' or 'images'? i.e. I
attempted this:
ie.text_field(:after?, ie.label(:for, "confirmPassword")).flash
Which didn't work. Even though the individual ie.label(:for,
"confirmPassword") *does* wo
> > v_type = text_field
> > ie.#{v_type}(:id, "emailAddress").flash
> I think you can not do that. What do you want to do with that? Maybe there
> is another way.
I simply wanted to loop through a list of objects (text_fields, select boxes,
radio buttons, checkboxes, etc) on a page, ensuring each
Should this be possible?
i.e. rather than specify an *exact* object within the IE, have this 'object'
within a variable:
v_type = text_field
ie.#{v_type}(:id, "emailAddress").flash
It doesn't work as I have it above. Neither do the following:
ie.{v_type}(:id, "emailAddress").flash
ine
end
Maybe the CSV parser will do a better job??? (My source file is
currently a CSV if that helps.)
- Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
I would double-check the name of the value. If that is correct, try 1)
using a regex, 2) try accessing it in IRB, or 3) use an exists? or
selected?, in no particular order.
Similar to Adam, I access mine as ie.select_list(:id, 'list2').select('name
of value'). Hope that h
We use select in our tests. It's a method in the Watir::SelectList class.
As usual, there is more than one way to solve the task.
Cheers,
Jason
On 6/22/07, Adam Reed <[EMAIL PROTECTED]> wrote:
Tiffany,
I don't believe 'select' is a valid action on a sele
Try $ie.select_list(:name, "list2").select("1")
On 6/22/07, Tiffany Fodor <[EMAIL PROTECTED]> wrote:
Hi all!
I have a group of three tiered select lists - the first one defines what
values will appear in the second and then the value selected in the second
defines what values will appear in th
... problem is, I don't seem to have a tag anywhere in sight. All I've
got inside the is another instance, and inside the of
that, nothing but a tag.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-
I've got a WYSIWYG editor inside an ... the editor is actually TinyMCE,
as offered here: http://tinymce.moxiecode.com/.
I'm having trouble accessing this in Watir. Whilst I can access the ,
I can't find anything else inside the frame that resembles a field to 'use'.
Here's the HTML:
irb(main)
can you post your test script? it would help to diagnose your problem.
Cheers,
Jason
On 6/15/07, Max Russell <[EMAIL PROTECTED]> wrote:
Hi there, I'm getting the following.
`require': no such file to load -- watir (LoadError)
I've checked the FAQs and downloaded t
Hey Jeff,
Make sure when you create your project, that it's a Ruby Project. You check
out it out from svn and then create your project/workspace as a Ruby
project. There is a little "ruby" icon that shows up for .rb files if this
is done. Are you seeing this?
Cheers,
Jason
Bret, +2.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Chris McMahon
Sent: Thursday, June 07, 2007 12:19 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] forum do not get the postings made using
themailing list
> Because of the increased traff
I've definitely tried it with and without the slashes "//". I also tried these
slashes within the variable itself, and even tried escaping the slashes with
"\", with no luck.
I'll be certain to try the "{}" and "#" on Monday - hopefully will do the trick.
___
Really quick one...
Trying to identify and click a link on a page, using the following:
$ie.link(:url => /testing_URL/, :text => /More.../).click
Where "testing_URL" is a variable I'm passing the script in a loop. In the
first instance, the variable value is *search-requests*. The actual l
> You can also identify elements using multiple attributes, for example :class
> and :index :ie.div(:class => 'contentItem', :index =>
> 3) # access the 3rd div with a class of '
>
Perfect - that's exactly what I was after. Must have missed that in my
tutorials and readings. Lovely.
___
quot; divs?
Cheers,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
his is a t-shirt and aimed and increasing Watir
usage/awareness to others. Let me know what you think and if you'd be
interested in one.
Cheers,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
return code or
message which could be used as indication to capture screen?
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
?
Regards,
Jason
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charley Baker
Sent: 2007年4月5日 1:35
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] How to make IE as active windows and capture it?
ie = IE.new
ie.goto('
e to initialized constant.
If I want to make those two values could configurable in testing script as well
as make them conform to the watir/ruby syntax, is there a reasonable way to
eliminate this message?
Thanks in advance.
Jason
From: [EMAIL PROTE
Dear all,
Can we configure the watir execution speed?
For example, wait 3 seconds for each step when people want to observe a
testing process, and wait 0.1s just for finishing the whole process.
Regards,
Jason
___
Wtr-general mailing list
d by
watir/ruby script?
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
customers, but we'll keep using
it for now.
Thanks again,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Discussing this with my
developers, we've collectively decided that it introduces a smell to our
project. (Unless there is a way to abolish the notion of workspace?) Also,
we've looked at Steel and it shows promise, but the current version
this problem?
Regards,
Jason
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sathees
Sent: 2007年3月28日 13:18
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] About the timeout of waitr
That will through a timeout exception and script will terminate
?
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Thanks for your reply.
But there will no message output in the console.
Could it output to both console and file?
Regards,
Jason
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charley Baker
Sent: 2007年3月27日 22:50
To: wtr-general
, 0 errors
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Dear all,
After running test cases, the test result will generate as files in hard
disk, I want to send them as attachment by email, is there any way to do
it?
Thanks,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http
the console and trace/debug information for every step in the log file,
is there an switch parameter in it can achieve it?
Or is there any ruby class/script/project which can conveniently solve
this problem?
Regards,
Jason
example_logger1.rb
Description: example_logger1.rb
Dear all,
Does watir/ruby provide a global configuration variable which could used to
change the speed of execution, rather than add many "sleep" in each scripts.
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforg
---
C:\watir1145>test.rb
Loaded suite C:/watir1145/test
Started
E.F.G.H.
Finished in 0.0 seconds.
4 tests, 0 assertions, 0 failures, 0 errors
---
Is
t_w_login.rb
./rt/rt_w_system_admin_admin_mail.rb
./rt/rt_w_system_admin_admin_password.rb
./rt/rt_w_system_admin_nameserver.rb
Now, I want to use the line sequence in script "test.rb" rather alphabetical
sequence, is there a way to achieve it?
Regards,
Jason
___
it give the detail information for each test case when they are
finished at once, such as the information about whether pass or fail, the
corresponding line if failure/error happens?
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
Hi Charley,
You gave a convenient way to achieve the goal.
By the way, I guess a double quote is missing before the last bracket in the
second line when using expand_path().
Thanks very much for your help.
Jason
From: [EMAIL PROTECTED] [mailto
directory of
"File.dirname(__FILE__)", is there a equivalent function or Regexp in
Ruby/Watir as strrchr/substr in C to achieve this?
Any hint or help is appreciated.
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
ng maybe need to pay attention to is that, use global variable $ie to
create the IE.new instance and use this variable in all test cases, rather than
use a local variable to create that for each test case.
Regards,
Jason
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTE
Yeah, it works,
Thanks very much.
Jason
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris McMahon
Sent: 2007年3月2日 11:04
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] How to get the localhost IP in Warit/Ruby
On 3/1/07, Jason He <[EM
Hi all,
Is there any available method to fetch the localhost's IP
address?
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Here was my solution, in case others have this problem. I used setup and the
sqlcmd.exe utility to call the SQL statement from within the batch file. So,
it looks like this:
def setup
system("sqlcmd.exe -i C:\\myproject\\CleanDatabase.sql -e -b -S x -U x -P x")
end
Che
?
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
As you mentioned, the "gets" will block the whole threads, maybe it need to be
replaced by other key press input method. Is there an equivalent method in Ruby
like trap method in Perl?
Regards,
Jason
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Beha
oment, however, it continue to execute until finish executing line 105.
If it could be paused at the moment when selecting part of console window, it
will be better.
Regards,
Jason
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Fitisoff
Sent:
.
Regards,
Jason
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ?eljko Filipin
Sent: 2007年2月28日 17:44
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Can Watir be paused & resumed manuallywhenrunning
test cases?
On 2/28/07, Jaso
Thank you for your reply.
I want to pause the testing process at moment and at random time length, and
resume it latterly.
Now, I want to know how to get keyboard input signal to cause ruby pause/resume.
Regards,
Jason
From: [EMAIL PROTECTED
Yeah, ruby-breakpoint could pause the application, but it depends on the
program and the test condition.
How to catch keyboard input signal by manual to pause/resume the testing
process, for example using CTRL+P to pause and CTRL+R to resume.
Thanks,
Jason
-Original Message-
From
Hi,
I want add the pause/resume feature into the watir testing, rather than
interrupt it and restart the whole testing process.
Please anybody tell me if it is possible, or is there such solution on
hand already.
Thanks
Jason
___
Wtr
PROTECTED]
They work if these tests are run individually. However, when I run the class,
they fail, since the TC#1 already created the user jdandy.
So, how can I call this batch file in between each TC, with the batch file
completing before starting TC#2?
TIA,
Jason
Yes, that worked Zeljko, thank you.
I found the example here- http://www.openqa.org/watir/watir_user_guide.html
Go to the heading titled Validating Test Results and you'll see this snippet of
code:if
ie.contains_text("Reached test verification point.")
puts: "Test passed. Page contains the
on the IE page. Can anyone offer
advice as to why I am always receiving 'Test failed!'? Thanks in advance, Jason
if assert(ie.contains_text("You have been signed in"))
puts("Test passed.")
CTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason He
Sent: 2007年2月2日 12:38
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] How to handle the popup security alert
The following code shows a case using clearSecurityAlertBox().
--
tps://10.101.4.69:4443/> ”, and a “Security Alert” pops up.
However, it will stop at this point, and not go further.
Is there anything I missed?
Regards,
Jason
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charley Baker
Sent: 2007年1月27
this problem, but how to solve it when use
Windows 2000 to do the test? (As we known Windows 2000 doesn’t support IE 7)
Regards,
Jason
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charley Baker
Sent: 2007年1月26日 13:17
To: wtr-gen
urity alert popup?
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
r # (NoMethodError)
I also tried above other methods, will return error too.
I found that these methods are defined in watir/assertions.rb.
Did I miss anything when use those methods?
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@
Do these test cases are compatible both running in IE and firefox? How about it
to the test cases with/without using test unit?
Should each test cases need to be changed, or just change the browser name at
the control list.
Regards,
Jason
From: [EMAIL
I use test unit or without it?
Could you please give some advice. Thanks.
Regards,
Jason
From: [EMAIL PROTECTED] 代表 ?eljko Filipin
Sent: 2007-1-19 (星期五) 8:37
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] How to run test cases in sequence rather than
Yes, they are the subclass of Test::Unit::Testcase, each one will be a
standalone script, and combined by a list script who will start the test.
Regards,
Jason
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: 2007年1月19日 10:51
To: wtr
Yes, they are the subclass of Test::Unit::Testcase, each one will be a
standalone script, and combined by a list script who will start the test.
Regards,
Jason
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: 2007年1月19日 10:51
To: wtr
I mean those later test cases in the list will run immediately, without waiting
the former ones to finish.
And the interval between them is so shorter that it looks like those cases run
at the same time
Regards,
Jason
From: [EMAIL PROTECTED] [mailto
]
$case_list.each {|x| require x}
--
Could somebody give some idea to handle this situation, thanks very much
Regards,
Jason
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
realized that IRB might help make things connect. But,
you’re exactly right – it’s a great foundation to build upon.
Good stuff! Thanks so
much!
(and, THANKS for
catching my misspelling!)
Thanks,
-Jason
Jason L. Alexander
» Chief
Technology Officer »
Telligent Systems
ideas.
If you see any inaccuracies or places where I could use
more best practices, please let me know. Any and all feedback is welcome. I
have thick skin. J
The presentation is at: http://jasona.net/files/folders/watir/entry14.aspx
Thanks everyone!
Thanks,
-Jason
Jason L
Bret,
I'd love to volunteer with documentation efforts. While I'm not quite
adept enough, yet, to help sling code within the main codebranch, I can
write documentation and I realize that this is probably one of the
bigger needs.
What are your plans for 1.5? How can I help? :)
Than
Actually, I used “sleep
5” and it worked fine. Thanks all.
Thanks,
-Jason
Jason L. Alexander
» Chief
Technology Officer »
Telligent Systems, Inc. » http://telligent.com » w:
214.420.1333 » http://JasonA.net
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED
the best way to pause the script a few seconds
while waiting on the page to finish processing?
Should I set $ie.sleeptime high before hitting the submit
button, and then setting it back afterwards (what’s the default value?)?
Thanks,
-Jason
Jason L. Alexander » Chief Technology
sting and automation, and,
unfortunately, Watir is a bit too technical for them. Not to say they
couldn't do it, but it's a much steeper curve for them, unfortunately.
I certainly am glad to have started to use Watir, and look forward to
contributing back to it later.
Thanks,
-Jason
My pleasure!
And, great follow-up - very useful information! And, some great advice
for me going forward!
Thanks so much! :)
Thanks,
-Jason
Jason L. Alexander > Chief Technology Officer >
Telligent Systems, Inc. > http://telligent.com > w: 214.420.1333 >
ht
t; method. I don't think it relates to Jason's issue.
We've migrated all the defects to Jira. Here is the current reference:
http://jira.openqa.org/browse/WTR-33
Bret
Angrez Singh wrote:
> Hi Jason,
>
> I think its a bug in the watir 1.4.1 code where the function
>
talk of a wait_until in Jira, but what can I do meanwhile?
Thanks,
-Jason
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Jason Alexander
Sent: Thursday, September 14, 2006
11:15 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general]
WIN32OLERuntimeError
assert(divTwo.text["You
must enter a valid subdomain for your community."] == nil)
assert(divTwo.text["Invalid subdomain. Domains may only contain letters,
numbers or hyphens."] == nil)
end
Any ideas? I’m no Watir guru, so I’m not sure
if this
77 matches
Mail list logo