Hi Guys,
Am using watir for quite some time with ruby version 1.8.4 and watir
gem version 1.5.1.1192. Till now it was working fine for me with this
version but just now i have upgraded my ruby to 1.8.6 and watir gem to
1.5.1.1230 which also supports firefox. Now am done with my
installation but
amazon doesnt give you the ability to have a gui, so its kind of
difficult to use firefox there.
Paul
On Tue, Jan 13, 2009 at 8:23 AM, badoug...@gmail.com
badoug...@gmail.com wrote:
Hi.
Basic questions, but I can't find the answers, and figured this is a
good place to post.
As I
This ought to do it:
require 'watir'
include Watir
ie=IE.new
ie.goto(file://c:/temp2.htm)
ie.element_by_xpath(//*...@name='imp1']).click()
Richard
--
Richard Lawrence
Certified Scrum Coach
Founder and Principal Consultant, Humanizing Work, LLC
303-895-7688
rich...@humanizingwork.com
Hi!
The only way I know to do this would be to perform an exists? check on
the various objects that this could be and click it if it exists.
if ie.button(:name, 'imp1').exists?
ie.button(:name, 'imp1').click
elsif ie.link(:name, 'imp1').exists?
ie.link(:name, 'imp1').click
end
Hope this
Thanks for your answer.
In the case the object is a textField or a listField I'm trying to set
the control with:
ie.element_by_xpath(//*...@name=imp1]).set(testing)
but an error comes up: 13:in `method_missing': unknown property or
method `set' (WIN32OLERuntimeError)
#This doesn't work to click the below link.
$ie.link(:text,Total Cholesterol).click
Any suggestions?
A
#text (Total)
BR
#Text (Cholesterol)
I looked in to replacing BR tags with \/n\, using hpricot, but I
couldn't figure it out.
can you use a reg exp on the link text
ie.link(:text , /Cholestorol/).click
Paul
On Tue, Jan 13, 2009 at 10:16 AM, Moochie dduph...@redbrickhealth.com wrote:
#This doesn't work to click the below link.
$ie.link(:text,Total Cholesterol).click
Any suggestions?
A
#text
Yep,
That worked, but is there a way to replace BR tags with carriage
returns?
Thanks,
DD
-Original Message-
From: watir-general@googlegroups.com
[mailto:watir-gene...@googlegroups.com] On Behalf Of Paul Rogers
Sent: Tuesday, January 13, 2009 11:19 AM
To:
I dont know. And I dont really know the best way of handling the line
break in the link. And it may even be different in ie/ff
Paul
On Tue, Jan 13, 2009 at 10:33 AM, Darin Duphorn
dduph...@redbrickhealth.com wrote:
Yep,
That worked, but is there a way to replace BR tags with carriage
Also would that work if we had multiple links with the same name?
(example)
ie.link(:text=/Cholestorol/,:index=2).click
Thanks,
DD
-Original Message-
From: watir-general@googlegroups.com
[mailto:watir-gene...@googlegroups.com] On Behalf Of Paul Rogers
Sent: Tuesday, January 13, 2009
Hello everyone,
Can anyone help with my previous question.
So I am trying to get data starting from a particular row (instead
of from the first row) of a CSV file and have not been very
successful.
Say I want to start getting data from Row 2 and as before Column 2 of
my CSV file.
I tried the
Looks like the problem is this line:
$text=WinGetText(window_title, )
In this situation, ruby doesn't know where to find the definition for
the 'WinGetText' method. So it is probably attempting to invoke the
method on the special 'main' object, which fails, resulting in the
NoMethodError
Hey,
One way to do this is to use a counter while iterating over the rows:
require 'csv'
array = []
row_count = 0
CSV::Reader.parse(File.open('foo.csv')) do |row|
row_count += 1
# Don't save the value on the first row
next if (row_count == 1)
array row[1]
end
That code will increment
Thanks for your suggestion. I work in a Mac environment and the
script worked.
However, I solved my problem using the .scan method, regex, and an
assert. If anyone is curious how I did it, just ask.
On Jan 12, 4:59 pm, gem dandy d-l-br...@roadrunner.com wrote:
Here ya go rob,
Hello,
Thanks for the snippet. IT works.
But I guess I should have posed my question differently. The new snippet and
the first snippet works great to get every value (from second column) from
every row of the CSV file and inserting into an Array.
PLease see the attached CSV file.
My problem is:
Great !!! It works now..!! Thanks to everyone who helped me.
Really appreciate your help.
On Jan 13, 5:36 am, gem dandy d-l-br...@roadrunner.com wrote:
Here a sample of a working script - Watir 1.6.2
This sample is a quick test to see if the word in the text box has a
trailing space (it
Hello All,
I have been recently learning to use both the CSV module and the
FasterCSV gem to create an array from a CSV file.
Say my CSV file(file.csv) looks like this (first row is the header,
not used in script):
Parameter,Value
URL,http://gamil.com
Login,mylogin
Password,mypassword
My script
We can't use set, exists? and many other methods after comment
:element_by_xpath
Thanks.
Wesley Chen.
On Wed, Jan 14, 2009 at 12:46 AM, TCBlues tcbl...@gmail.com wrote:
Thanks for your answer.
In the case the object is a textField or a listField I'm trying to set
the control with:
Follow Up
Hello All,
After googling for some time, I found an easy way to get the data into
an Hash. Thanks to One Mr.Ryan.
-
hash = {}
CSV.foreach('test.csv') do |row|
hash[row[0]] = row[1]
end
-
But I have some questions regarding accessing the values
Sorry for asking Ruby questions in Watir group. But figured, somebody
would be able to help me.
Thanks once again
On Jan 13, 5:19 pm, Margam nk.mar...@gmail.com wrote:
Follow Up
Hello All,
After googling for some time, I found an easy way to get the data into
an Hash. Thanks to One Mr.Ryan.
Hi all, $ff.button(:id, confirm).click this is example code, you need to
change the correct id or name value in actual html page, and Sur, you can
use same code to work very well in the IE.
Wilson Xu
On Mon, Jan 12, 2009 at 3:24 PM, Sur surbhi.bh...@tcs.com wrote:
Were you able to see my last
You don't get back the specific object type from element_by_xpath, so
some methods don't work. But this works:
b = Watir::IE.new
b.goto 'http://www.google.com/'
txt = b.element_by_xpath(//*...@name='q'])
txt.value = 'Richard Lawrence'
btn = b.element_by_xpath(//*...@name='btnG'])
btn.click
So
Margam,
This is all to do with the basics of Ruby. It would be well worth
working through some of the ruby tutorials.
In this case;
hash[]
On 14 Jan 2009, at 01:19, Margam nk.mar...@gmail.com wrote:
Follow Up
Hello All,
After googling for some time, I found an easy way to get the data
My apologies - knocked send whilst getting onto the train.
In this case, you are using the CSV modules to load strings as key/
value pairs into a hash. The important bit being that both the key,
and the value when retrieved from the hash will be strings.
Let us examines few snippets of your
24 matches
Mail list logo