Re: [Wtr-general] Installing watir 1.5 actually installs 1.4.1 again

2007-07-20 Thread marekj
One word of caution with downloaded gems. Use 'gem install watir --local' option to to pick up the downloaded gem and not the --remote marekj On 7/20/07, vipin [EMAIL PROTECTED] wrote: Hi, I have watir 1.4.1. I uninstalled it by typing gem uninstall watir. I then downloaded watir-bonus

Re: [Wtr-general] Dissapearing text fields

2007-07-18 Thread marekj
I assume you say that this line fails: assert($browser.text_field(:name, 'Name').exists?) in test_FileCompanyInfo Tricky... Are there other def test_ in the class? My immediate hunch is that tests run alphabetically and not sequentially if you have more than one. could be that the test runs

Re: [Wtr-general] Dissapearing text fields

2007-07-18 Thread marekj
this: require 'test/unit' class TC_myTests Test::Unit::TestCase do this: require 'watir/testcase' class TC_myTests Watir::TestCase and all your tests run sequentially. --marekj so I renamed my tests like it had suggested , test_000_name1 test_001_name2 etc to force the ordering, and it worked

Re: [Wtr-general] Wtr-general Digest, Vol 44, Issue 17

2007-07-16 Thread marekj
On 7/12/07, Pallavi Sharma [EMAIL PROTECTED] wrote: Hi Marekj thanks for the quick and informative reply. We are planning to do something very similar to what is stated in ur reply. Encapsulating watir functions from the end user and providing him with a vocab [keywords] to construct his test

Re: [Wtr-general] How to deal with the copyrihgt symbol

2007-07-13 Thread marekj
if ie.text.include?((c)) puts found by html char set copy if ie.text.include?(copy;) puts found by html char set 169 if ie.text.include?(#169;) /pre I get this: test⌐ ⌐ ┬⌐ found by octal found by hex marekj On 7/13/07, jhe [EMAIL PROTECTED] wrote: I use puts $ie.text to print html document

Re: [Wtr-general] How to pick the last word in the sentence

2007-07-12 Thread marekj
yes, you are right, much nicer to use the specific Array.last It's so nice to call Array ring ring ring Hi Array give me your last element please and Array responds. marekj On 7/10/07, Paul Rogers [EMAIL PROTECTED] wrote: I much prefer using words = sentences.split # or add (' ') to make

Re: [Wtr-general] Problem with attach using :title

2007-07-12 Thread marekj
important and Any threads not joined will be killed when the main program exits. On 7/3/07, Bret Pettichord [EMAIL PROTECTED] wrote: marekj wrote: hmmm... I was thinking that if I have 3 scripts running at the same time with -b switch they would get confused at which window to talk to. Take a look

Re: [Wtr-general] Keyword driven framework around Watir

2007-07-11 Thread marekj
by anyone who interacts with Domain Model objects. the watir code si written later. Is this something you have in mind? marekj On 7/12/07, Pallavi [EMAIL PROTECTED] wrote: Hi First all let me have the privilege of starting the very first discussion here at Google groups :). i am working

Re: [Wtr-general] Concurrent Threads and different variables in each thread

2007-07-11 Thread marekj
if you don't join the threads the execution will stop when program exists. On 7/11/07, Jason [EMAIL PROTECTED] wrote: 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'

Re: [Wtr-general] How to pick the last word in the sentence

2007-07-10 Thread marekj
# or add (' ') to make split on whitespace explicit. last_word = words[-1] #last element in Array is your last word in a heredoc take a look at String.split goodness. http://www.ruby-doc.org/core/classes/String.html#M000818 marekj On 7/9/07, sapna [EMAIL PROTECTED] wrote: Hi All, Pleas can you help

Re: [Wtr-general] Reporting suggestions?

2007-07-06 Thread marekj
you can use 'tee' program. It's part of cygwin distribution if you have that installed. it can capture everything from the stdout to a file if you pipe it from the command line. So when you run a test append | tee somefile.txt to dump your stream in there. like so.. promptts_mysuite.rb | tee -a

Re: [Wtr-general] Problem with attach using :title

2007-07-02 Thread marekj
will have $ie attached to different instance of IE in memory. Am I on the right track? Your ideas are much appreciated. Thanks marekj On 6/30/07, Bret Pettichord [EMAIL PROTECTED] wrote: jim_matt wrote: I wanted to share something I discovered. I had reported earlier that I sometimes I had

Re: [Wtr-general] Problem with attach using :title

2007-07-02 Thread marekj
On 7/2/07, Bret Pettichord [EMAIL PROTECTED] wrote: marekj wrote: a quick question about attaching to the session of IE. I am currently relying on attaching to one window on the desktop but I want to move towards running -b(ackground) option of Watir and running multiple IE windows

Re: [Wtr-general] data driven tests and looping through rows

2007-06-28 Thread marekj
Jason, I think you can do better with Faster CSV gem. You can read (slurp) the entire csv into array of arrays (two dimensional). like zo... require 'fastercsv' mydata = FCSV.read('filename.csv') now you can do whatever you need with mydata because it's a 2D Array[][]

[Wtr-general] ci_reporter usage of xml files

2007-06-27 Thread marekj
the reports into one summary file? Any ideas would be helpful . Thanks. marekj ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Iterate through every link on the page

2007-06-27 Thread marekj
You can harvest all the links href and stuff them in array: all_links_href = $ie.links.each { |link| link.href} Clicking could be a problem because after you click the first one you are no longer on the page. all_links_href.each { |href| $ie.link(:href, href).click} Does anybody know how to click

Re: [Wtr-general] Iterate through every link on the page

2007-06-27 Thread marekj
links You will need to furhter extract that array based on your needs. But definitely try hpricot marekj On 6/27/07, marekj [EMAIL PROTECTED] wrote: You can harvest all the links href and stuff them in array: all_links_href = $ie.links.each { |link| link.href} Clicking could be a problem because

Re: [Wtr-general] Setting up before a series of tests (WAS: test/unit argument error)

2007-06-27 Thread marekj
/console/testrunner' include Test::Unit::UI::Console ) marekj On 6/27/07, Jeff Fry [EMAIL PROTECTED] wrote: One option is to have a setup test that you guarantee executes first. Something like def test_aaa_setup_environment # do initial setup for the upcoming tests end You could of course do

Re: [Wtr-general] return table element content type value

2007-06-27 Thread marekj
Max. I am curious what you are trying to do because I may have to do something similar. For example. Running this code: $ie.tables.each do |table| puts table.class puts table table.each do |row| puts row.class puts row row.each do |cell| puts cell.class end end end will