Re: [Wtr-general] Watir with Ajax

2007-01-19 Thread Naga Harish Kanegolla
Hi This is the html for that text field..
input id=app_feedback_title name=app_feedback[title] size=30 type=text 
/

Please tell me the wrong one i am doing..
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6170messageID=17351#17351
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Two queries in Watir

2007-01-19 Thread Maloy kanti debnath
Hello Ogre,

Thank you for your correct answer.  If you also tell us whether there is a 
default 'log' in Watir and if so, how to write to it and where to view it?, I 
would be thankful.

Thanks,
Maloy.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6068messageID=17353#17353
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir with Ajax

2007-01-19 Thread Željko Filipin

On 1/19/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote:


input id=app_feedback_title name=app_feedback[title] size=30
type=text /



Both of this worked for me.

ie.text_field(:name, app_feedback[title]).set(harish)
ie.text_field(:id, app_feedback_title).set(harish)

You said to watir that name is contract_my_document[title], but it is
app_feedback[title].
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Watir with Ajax

2007-01-19 Thread Naga Harish Kanegolla
Sorry I gave the wrong html in the forum. This is my correct one. Please check 
this,

input id=contract_my_document_title name=contract_my_document[title] 
size=30 type=text /

Thank u..
Harish
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6170messageID=17356#17356
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] same text for different urls.

2007-01-19 Thread Naga Harish Kanegolla
Hi all,
 How to click on the links based up on the href rather than the text?
Ex:: I am having the same text with different ids. i.e., we are having 30  add 
a term  links..For different links having different href (url). so how could i 
code using selenium for this kind of hrefs. Please help me regarding this..

Thanks in Advance,
Harish
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6181messageID=17363#17363
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] same text fordifferent urls..

2007-01-19 Thread Naga Harish Kanegolla
Hi all,
 How to click on the links based up on the href rather than the text?
Ex:: I am having the same text with different ids. i.e., we are having 30  add 
a term  links..For different links having different href (url). so how could i 
code using watir for this kind of hrefs. Please help me regarding this..

Thanks in Advance,
Harish
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6183messageID=17365#17365
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] same text for different urls.

2007-01-19 Thread Željko Filipin

On 1/19/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote:


so how could i code using selenium



This is watir list. There is selenium forum at
http://forums.openqa.org/forum.jspa?forumID=3
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Watir with Ajax

2007-01-19 Thread Željko Filipin

On 1/19/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote:


input id=contract_my_document_title name=contract_my_document[title]
size=30 type=text /



Your code

ie.text_field(:name, contract_my_document[title]).set(harish)

works for me for this html. Maybe it's parent tag is hidden or something.
Post some more html that surrounds it and your exact error message, and
somebody might have a clue.
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] hi doubts in WindowHelper class

2007-01-19 Thread Maloy kanti debnath
hi,

  While i was going through the windowhelper class i found a Public Instance 
method called logon but i am not able to use it can any one help me out ..

thank you,
maloy
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6185messageID=17368#17368
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] same text for different urls.

2007-01-19 Thread Naga Harish Kanegolla
Hey sorry, I want in watir.. sorry for the mistake..
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6181messageID=17374#17374
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Ruby equivalent of 'Continue' in C

2007-01-19 Thread sarita
I want to execute a test on a table where links are to be clicked based upon 
its status. Only when status not 'Complete', it's to be clicked  further 
actions to be performed. Otherwise those steps to be skipped. So, thinking of 
Ruby equivalent of 'Continue' in C. Please help.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6187messageID=17373#17373
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] same text for different urls.

2007-01-19 Thread Željko Filipin

On 1/19/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote:


Hey sorry, I want in watir.. sorry for the mistake..



After I replied I noticed that you have already corrected yourself in
another thread. :)
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Watir with Ajax

2007-01-19 Thread Naga Harish Kanegolla
HI,
  But its not working for me. Basically its working for all the text_fields. 
But not working for this, I hope its becoz the form is rendering dynamically 
thru ajax call. This is the error..
Error::
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to 
locate object, using name and contract_my_document[title] 
(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3393:in `set'
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6170messageID=17375#17375
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] same text for different urls.

2007-01-19 Thread Naga Harish Kanegolla
Thats ok, Any idea regarding that??
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6181messageID=17381#17381
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] same text for different urls.

2007-01-19 Thread Željko Filipin

If you have html like this

a href=atext/a
a href=btext/a

you can click link with href=b with any of this

ie.link(:href, /b/).click
ie.link(:url, /b/).click
--
Zeljko Filipin
zeljkofilipin.com
Testing is not only what I do for a living. It is also what I do for fun.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Ruby equivalent of 'Continue' in C

2007-01-19 Thread Paul Carvalho

For those of us who don't know how to program in C, can you please explain
what Continue does?  It's not entirely clear to me what you are trying to
do.


On 19/01/07, sarita [EMAIL PROTECTED] wrote:


I want to execute a test on a table where links are to be clicked based
upon its status. Only when status not 'Complete', it's to be clicked 
further actions to be performed. Otherwise those steps to be skipped. So,
thinking of Ruby equivalent of 'Continue' in C. Please help.

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

Re: [Wtr-general] same text for different urls.

2007-01-19 Thread Naga Harish Kanegolla
Hi thank u,its working for the general urls, but not for the ajax links, can u 
please help me for the ajax links.
This is the code i used.
ie.link(:url,http://localhost:3000/data_entry/ajax_add_term/133?contract_id=140;).click

This is the generated html..

a href=# onclick=new 
Ajax.Request('/data_entry/ajax_add_term/131?contract_id=140', 
{asynchronous:true, evalScripts:true}); return false;add a term/a

Thanks in Advance,
Harish
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6181messageID=17388#17388
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir with Ajax

2007-01-19 Thread Paul Carvalho

Are these links and fields within frames?  Do you know if the frame has
completely finished loading after the click and before the text_field is
set?  What version of Watir are you using?


On 19/01/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote:


HI,
  But its not working for me. Basically its working for all the
text_fields. But not working for this, I hope its becoz the form is
rendering dynamically thru ajax call. This is the error..
Error::
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to
locate object, using name and contract_my_document[title]
(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3393:in `set'

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

Re: [Wtr-general] Two queries in Watir

2007-01-19 Thread gdx
hello,

I don't know if there is a default log (text file) in Watir.
My default log is the standard output on the console :D .
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6068messageID=17387#17387
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir with Ajax

2007-01-19 Thread Xavier Noria
On Jan 19, 2007, at 1:25 PM, Naga Harish Kanegolla wrote:

 HI,
   But its not working for me. Basically its working for all the  
 text_fields. But not working for this, I hope its becoz the form is  
 rendering dynamically thru ajax call.

You seem to be using Rails. Do you mean the form is created  
dynamically via the _response_ of an Ajax call? That is, the elements  
of the form where not in the original DOM?

-- fxn

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


Re: [Wtr-general] Two queries in Watir

2007-01-19 Thread Charley Baker

Take a look at the watir examples directory. You'll find a logging directory
with test_logger1.rb and example_logger1.rb.

-Charley

On 1/19/07, Maloy kanti debnath [EMAIL PROTECTED] wrote:


Hello Ogre,

Thank you for your correct answer.  If you also tell us whether there is a
default 'log' in Watir and if so, how to write to it and where to view it?,
I would be thankful.

Thanks,
Maloy.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6068messageID=17353#17353
___
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] same text fordifferent urls..

2007-01-19 Thread Charley Baker

Try something like this:

ie.link(:url, /some regex to match/).click

-Charley

On 1/19/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote:


Hi all,
 How to click on the links based up on the href rather than the text?
Ex:: I am having the same text with different ids. i.e., we are having
30  add a term  links..For different links having different href (url). so
how could i code using watir for this kind of hrefs. Please help me
regarding this..

Thanks in Advance,
Harish
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6183messageID=17365#17365
___
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 to use the commands present in the 'SimpIe' class?

2007-01-19 Thread Chris McMahon
On 1/18/07, Maloy kanti debnath [EMAIL PROTECTED] wrote:
 Today morning, when I was going through the 'built-in' scripts, like 
 watir.rb, watir_simple.rb etc. just to have a look at the source code, I 
 happened to note that we can modify the source code of various functions to 
 suit our need

That's one of the reasons that Ruby is such a powerful language.
You'll find that modifying the language itself is a popular acivity.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Ruby equivalent of 'Continue' in C

2007-01-19 Thread Nathan
The Ruby equivalent to continue is next.  For example:

intIndex = 0
while intIndex  100
nbsp;nbsp;intIndex = intIndex + 1
nbsp;nbsp;if (intIndex % 2) == 1
nbsp;nbsp;nbsp;nbsp;next
nbsp;nbsp;end
nbsp;nbsp;puts The value was odd:  + intIndex.to_s
end

The above code, though dumb, would only print the string every other time.

Nathan
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6187messageID=17394#17394
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How to click on image associated with link

2007-01-19 Thread minal
Thanks to both of you for your replies. 

Clicking on image based on IMG tag attributes, will not work for this 
application, since each row in table has same image with same IMG-tag 
attributes.

For some strange resons ie.cell(:id, 10TD37).click doesn't work on my 
application.

But I found work around for that, in case anybody is looking solution for 
similar problems. 

my_row = ie.row( :id , TR37)
links = tabs[my_row.column_count()].document().all.tags(A)
my_link=
 links.each do |p|
my_link=p.invoke(href)  # since there is only one A-tag in each cell, we 
are ok 
 end
ie.goto(my_link)  # this is same as clicking on image

minal
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6176messageID=17403#17403
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] How to retrieve TH in table

2007-01-19 Thread Brad
When I use the following following command, the array shows the first element  
as '[]' instead of the Header values.  How do I get the Header values from the 
table?

my_array = $browser.table(:id , 
'ctl00_MasterContentPlaceHolder_DomainGridView').to_a
p my_array

I see the following output:
[[], [Item 1, Local25], [Item 2, Local26], [Item 3, Local27], [, 
]]

Note the first element in the array is empty but I expected it to be the Header 
values.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6193messageID=17408#17408
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] OT: anyone tried JRuby?

2007-01-19 Thread Chris McMahon
Martin Fowler says it works a treat
http://martinfowler.com/bliki/JRubyVelocity.html

I just wondered if anyone here has spiked anything with JRuby.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How to retrieve TH in table

2007-01-19 Thread Brad
In trying the following, I get the header values.

my_array = $browser.table(:id , 
'ctl00_MasterContentPlaceHolder_DomainGridView').row_values(1)
p my_array

Why doesn't '.to_a' give the first row (Header)?

Thanks,
Brad
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6193messageID=17411#17411
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] OT - Bug in Ruby with adding strings?

2007-01-19 Thread Paul Carvalho

I just found what looks like a bug in Ruby.  Here's a simple script that
will expose this bug:

irb(main):001:0 x = 1
= 1
irb(main):002:0 puts 'foo' + x.to_s +'bar'
SyntaxError: compile error
(irb):2: syntax error
puts 'foo' + x.to_s +'bar'
^
   from (irb):2


I finally figured out that it was the Plus sign *right next* to the bar,
*after* the to_s method that Ruby dislikes.  If I insert a space, I get
the correct output.  If I take out both spaces, I get the correct output.
It's only if there's a space after the to_s and none between the Plus sign
and string-in-quotes that it blows up.

That is:

puts 'foo' + x.to_s + 'bar' # this works
puts 'foo' + x.to_s +'bar'  # doesn't work
puts 'foo' + x.to_s+ 'bar'  # this works
puts 'foo' + x.to_s+'bar'   # this works



Anyone know why this might be?  Is there a proper place where I might pass
this information on? (I'm not on any other Ruby groups right now.)
I haven't played with it anymore, so I wonder if this bug exists with other
methods.

I'll try to remember to be consistent with my spaces moving forward.
Thought some of you might be interested.

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

Re: [Wtr-general] OT - Bug in Ruby with adding strings?

2007-01-19 Thread Chris McMahon
 Anyone know why this might be?  Is there a proper place where I might pass
 this information on? (I'm not on any other Ruby groups right now.)

comp.lang.ruby?   http://groups.google.com/group/comp.lang.ruby/topics?lnk=li

They pay pretty good attention there, and you have a good example.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] OT: anyone tried JRuby?

2007-01-19 Thread Charley Baker

We used JRuby internally for access to a 3rd party search library. It works
great for creating and using java objects which may live on your middle
tier. I haven't spiked anything externally, but let me know if you have any
specific questions.

-c

On 1/19/07, Chris McMahon [EMAIL PROTECTED] wrote:


Martin Fowler says it works a treat
http://martinfowler.com/bliki/JRubyVelocity.html

I just wondered if anyone here has spiked anything with JRuby.
___
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] OT: anyone tried JRuby?

2007-01-19 Thread Nick Sieger

On 1/19/07, Chris McMahon [EMAIL PROTECTED] wrote:


Martin Fowler says it works a treat
http://martinfowler.com/bliki/JRubyVelocity.html

I just wondered if anyone here has spiked anything with JRuby.



I use it quite a bit, but then again I'm one of the developers :)

Of course, it's unfortunately not going to fit the bill yet for WATiR since
it relies on Win32::OLE which is implemented in C on matzruby, and we don't
have a replacement for JRuby yet.

Other than that, feel free to try it out and send reports over to the JRuby
mailing list!

http://xircles.codehaus.org/projects/jruby/lists

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

Re: [Wtr-general] OT: anyone tried JRuby?

2007-01-19 Thread Bret Pettichord
Nick,

Thanks for the update. Could i use DRB to connect JRuby to a MatzRuby 
process running Watir?

Bret

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


Re: [Wtr-general] OT: anyone tried JRuby?

2007-01-19 Thread Nick Sieger

On 1/19/07, Bret Pettichord [EMAIL PROTECTED] wrote:


Nick,

Thanks for the update. Could i use DRB to connect JRuby to a MatzRuby
process running Watir?



I haven't used DRb on JRuby yet personally, but I've heard reports of some
people using it successfully.  That said, I'll caveat by saying that we have
another limitation of not having a full-fledged implementation of the Ruby
Marshal module.  This is a high priority for us to fix though, because Rails
session persistence depends on it.

A quick search of our JIRA shows some issues open, some closed.

http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=truepid=11295query=drbsummary=truedescription=truebody=true

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