[Wtr-general] Concurrent tests, different regions...

2007-06-05 Thread eisdrache
Here is the basic idea of what I am trying to do...

I have one site, lets call it www.example.com. On that site, there is a login 
page which directs to four different regions, say region1.example.com, 
region2.example.com, etc.

Now, on the other side of the equation, watir is being run from a remote 
webserver. And on that webserver I have a php page which controls the execution 
of the watir script and then posts the results in a table to the user.

So, at the moment, the user goes to the php page. Clicks "start test" and watir 
then goes to www.example.com and one by one tests each region. However, what I 
would like is when the user clicks the test button, four separate tests will 
begin and test each region concurrently.

I have tried setting up something like this:

php page:

$regions = array('region1','region2','region3','region4');
 
foreach ($regions as $region) {
 $cmd = "start example.rbw $region";
 exec($cmd);
 sleep(3);
}

ruby page:

region = $ARGV[0]

$ie = Watir::IE.start("www.example.com")

$ie.text_field(:name, "user").set(username)
$ie.text_field(:name, "password").set(password)
$ie.select_list(:name, "region").select(region)

proceed with testing...

This, however, does not seem to work. Seems as if two or three instances will 
start but only one will actually finish. So, hopefully this makes sense and 
hopefully someone can help me figure this one out.

Thanks in advance.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How To Check If A Row Inside A Table Exists Or Not & Count Of Rows....

2007-06-05 Thread kumari
Hi
If u want only the row count of partiular table without nested ones just use 
the below function at the starting of script and then use the normal syntax 
"ie.table(:id, "Table5").row_count()".u will get the row count of particular 
table



module Watir
include Watir::Exception
class Table < Element
include Container
def row_count 
assert_exists
raise UnknownTableException , "Unable to locate a table using [EMAIL PROTECTED] 
and [EMAIL PROTECTED] " if @o == nil 
return @o.rows.length 
end 
end
end
**

now use "ie.table(:id, "Table5").row_count()".If i am write u have to get the 
exact row  count of table without nested rows.

bye
Kumari
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] How To Check If A Row Inside A Table Exists Or Not & Count Of Rows....

2007-06-05 Thread san
Hi Everybody...

I Just Tried 

ie.table(:index, 1).row(:index, 7).exists?
or
ie.table(:index, 1)[7].exists?

But Nothing Works... 

here's The html


1
2
3
4
5


Or Suppose I Have Nested Tables...







Rating 
History





 



:: 
Series 1









 Date
 Rating
 Action



 10 OCT 2006
 Aaa
 Change to definitive



 5 SEP 2006
 (P)Aaa
 New




 
 







:: 
Series 3









 Date
 Rating
 Action



 18 MAY 2007
 Aaa
 Change to definitive



 18 MAY 2007
 Aaa
 No Rating



 7 MAY 2007
 (P)Aaa
 New




 
 











Now If I Want The Nos Of Rows Of Table with ID Table5 Only What Should I Do, 
Coz I Just Tried 
[b]ie.table(:id, "Table5").row_count()[/b] Gives 21 no of Rows, The Total No Of 
Rows Including The Nested Ones. As Table5 Contains Only 14 Rows Of 
ItselfWhich You Can See By IE Developer Toolbar...

Sorry For The Long Html... :)

Thanks Everybody... :)
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How would you approach verification of data in *xml* format with Watir?

2007-06-05 Thread Chris McMahon
It's been a while since I've mucked around with REXML, but this works:

#
require "rexml/document"
include REXML

xml = REXML::Document.new("
 username
 ")

 xml.elements.each("*/STATION_BROADCASTER") {|e| puts e.text}
##

I'll recommend that you read the tutorial over and over.  If I'm not
mistaken, there's a REXML mail list, or comp.lang.ruby is always a
good place to find information from people much more experienced than
me.

http://www.germane-software.com/software/rexml/docs/tutorial.html

On 6/5/07, Lana <[EMAIL PROTECTED]> wrote:
> Thank you for right direction, this helped me to get started:
> -
> #includes
> require 'watir'
> require "rexml/document"
> include Watir
> include REXML
>
>
> doc = Document.new File.new("station.xml")
> root = doc.root
> puts root.elements["STATION_BROADCASTER"]
> =
> result:
> username
> =
> But I seems can't find how to get actual value of element 
> 'STATION_BROADCASTER', as there is no attribute, any suggestions?
>
> this is my xml:
> 
>   username
>
> Thank You,
> Lana
> ___
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How would you approach verification of data in *xml* format with Watir?

2007-06-05 Thread Paul Rogers
you may want to look at xml unit - http://xmlunit.sourceforge.net/


- Original Message - 
From: "Lana" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, June 05, 2007 7:13 PM
Subject: Re: [Wtr-general] How would you approach verification of data in 
*xml* format with Watir?


> Thank you for right direction, this helped me to get started:
> -
> #includes
> require 'watir'
> require "rexml/document"
> include Watir
> include REXML
>
>
> doc = Document.new File.new("station.xml")
> root = doc.root
> puts root.elements["STATION_BROADCASTER"]
> =
> result:
> username
> =
> But I seems can't find how to get actual value of element 
> 'STATION_BROADCASTER', as there is no attribute, any suggestions?
>
> this is my xml:
> 
>  username
>
> Thank You,
> Lana
> ___
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> 


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How would you approach verification of data in *xml* format with Watir?

2007-06-05 Thread Lana
Thank you for right direction, this helped me to get started:
-
#includes
require 'watir'
require "rexml/document"
include Watir
include REXML 


doc = Document.new File.new("station.xml")
root = doc.root
puts root.elements["STATION_BROADCASTER"]
=
result:
username 
=
But I seems can't find how to get actual value of element 
'STATION_BROADCASTER', as there is no attribute, any suggestions?

this is my xml:

  username 
  
Thank You,
Lana
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How would you approach verification of data in *xml* format with Watir?

2007-06-05 Thread Chris McMahon
On 6/5/07, Lana <[EMAIL PROTECTED]> wrote:
> How would you approach verification of data in *xml* format with Watir 
> through the browser?
> data example: _http://www.live365.com/stations/easytempo?site=xml_
> is there some XMLParser available?

My understanding is that REXML is pretty much the standard.
http://www.germane-software.com/software/rexml/
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] How would you approach verification of data in *xml* format with Watir?

2007-06-05 Thread Lana
How would you approach verification of data in *xml* format with Watir through 
the browser?
data example: _http://www.live365.com/stations/easytempo?site=xml_
is there some XMLParser available?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] gem error installing 'builder'

2007-06-05 Thread Bret Pettichord
jim_matt wrote:
> So far, all my scripts are working without a problem.
>  
Thanks for the report.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Upgrading the gem for watir 1.5.1.1192

2007-06-05 Thread Bret Pettichord
imran wrote:
> But still the code asking me to upgrade to 1.5.1.1100.
>   
What message are you seeing? What is the exact language?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Upgrading the gem for watir 1.5.1.1192

2007-06-05 Thread imran
A new gem is ready for download, this is the latest pull from Subversion 
source, tagged at 1.5.1.1192. This gem has a new install process, due to a new 
dependency on other gems.

After download the gem, execute the following commands in the same directory as 
the gem:

> gem install win32-process --include-dependencies
> gem install watir

I have applied above .. operations
as i execute first command where i have extracted the gem. At the command 
propmt it asks for the selection ..
2 for ruby and 3 for watir.

I apply first one. and then second command is executed.
But still the code asking me to upgrade to 1.5.1.1100.
Current version of Ruby = Ruby184-18
Current Version of Watir = 1.4.1

What should i do now to upgrade my watir to 1.5.1.1192.

Thanks.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] HELP!!!!!!!!! Stuck with a potential bug.

2007-06-05 Thread Vipul
yes it worked as  a button. Although i am surprised why image worked as button.

thanks for the help!
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Read a picture number

2007-06-05 Thread chitta
I use my gmail account for testing also. You do not need 50 accounts. Gmail
allows you to add "+some_text" after you user name and before "@gmail.com".
Like this.

  username+account1 at
gmail.com
  username+account2 at
gmail.com

Anything sent to  
username+account1 at gmail.com and
  username+account2 at
gmail.comwill be delivered to inbox of
  username at gmail.com.

 
 
 

---
 
hi,
 
Great idea, It's working.
 
 
Thank you very much
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Clicking link in Ajax table

2007-06-05 Thread Željko Filipin

On 6/5/07, Harmeet <[EMAIL PROTECTED]> wrote:


How can I post the HTML code here in this message



Just paste it, it usually works.

Zeljko
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Read a picture number

2007-06-05 Thread Željko Filipin

On 6/5/07, chitta <[EMAIL PROTECTED]> wrote:


 I really need more then 50 active email addresses for my testing purpose



I use my gmail account for testing also. You do not need 50 accounts. Gmail
allows you to add "+some_text" after you user name and before "@gmail.com".
Like this.

[EMAIL PROTECTED]
[EMAIL PROTECTED]

Anything sent to [EMAIL PROTECTED] and
[EMAIL PROTECTED] be delivered to inbox of
[EMAIL PROTECTED]

Zeljko
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] To view the message send based on ID created.

2007-06-05 Thread sapna
Hi,

I think this [ie.link(:href, /id=1274/).click] will help me out but I have 
another question for this as the id created is dynamic it keep changing for 
every new transaction. So I need to make transaction and navigate to message 
page click on the Bill Payment Inquiry link based on the current ID created. So 
how do I fetch the ID.

Regards
Sapna
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general