HI ,
Thank You it worked for that link. But I am having the links of the same kind
with same contract_id=227.
a href=# onclick=new
Ajax.Request('/data_entry/ajax_add_term/131?contract_id=227',
{asynchronous:true, evalScripts:true}); return false;add a term/a
a href=# onclick=new
How this works?
ie.div(:name = 'foo', :index = 2).click
I tried to find in Watir source how it is done, but I could not find it.
Could somebody please point me to the right method? It would make sense to
me if the argument was a hash.
ie.div({:name = 'foo', :index = 2}).click
I would like to
ie.link(:html, /133/).click
or
ie.link(:html, /ajax_add_term\/133/).click
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Hi,
I tried the two types but its giving error.
data_entry.eb.rb:16: syntax error, unexpected tINTEGER, expecting ')'
ie.link(:html,/ajax_add_term/131/).click
So any other ideas, i tried all the combinations. but its getting error. Please
help me.
you missed typed it, type it exactly
ie.link(:html, /ajax_add_term\/133/).click
I think the \ / is allowing the forward slash to be used as a string and not as
a special regex character.
-
Posted via Jive Forums
This does not work?
ie.link(:html, /133/).click
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
On 2/8/07, John Lolis [EMAIL PROTECTED] wrote:
you missed typed it, type it exactly
ie.link(:html, /ajax_add_term\/133/).click
I think the \ / is allowing the forward slash to be used as a string and
not as a special regex character.
Exactly.
--
Zeljko Filipin
zeljkofilipin.com
Thanks, but that doesn't seem to work - the fetch_all method is not one of my
choices, when I follow your first steps. I've successfully crashed ruby a
couple of times already - so here's the ultimate problem. I desire to use my
database to store actual files. These files are just text, but
Zeljko,
I'm not sure if this is what you are looking for, but here is the source for
`click()` method in Watir:
# This method clicks the active element.
# raises: UnknownObjectException if the object is not found
# ObjectDisabledException if the object is currently
to add to that, you could do something like writing out to a text file thats
just a bunch of insert statements... FUN!
hrm, so many ideas now.
-
Posted via Jive Forums
Hi Nathan,
Thanks, but now I see I was not clear enough. I did not want how click
method works (but, once more, thanks for your time). I wanted to know how
are this method arguments handled:
(:name = 'foo', :index = 2)
It would make sense to me if it is a hash
({:name = 'foo', :index = 2})
bbiker,
Butting in is encouraged! So, basically, this command USED to work correctly
for me in the past. Then something happened to my machine's configuration or
something along those lines that made this stop working as it previously had.
Now the only way this command works is if an instance
heres my question to you.
You want SQL to store your results, but you are having some issues with using
MSSQL. This tells me in the future you will continue to have issues. Why not
think around the problem? Export into a format that can be imported into MSSQL
(there are a ton of formats and it
Shok,
I'm sorry my example wouldn't work for you directly; I copied / pasted it out
of some of my code, which does work, so I'm unsure why. Even though you are
shelving it for a while, here is some more complete code of how my Excel test
automation output works:
(This automation actually
On 2/8/07, Nathan [EMAIL PROTECTED] wrote:
Thanks, but that doesn't seem to work - the fetch_all method is not one of my
choices, when I follow your first steps. I've successfully crashed ruby a
couple of times already - so here's the ultimate problem. I desire to use my
database to store
Zeljko,
The arguments are a hash. Ruby implicitly creates a hash when they're sent
in. I'm not sure how it's not working for you. Try a simple example:
require 'test/unit'
class HashArgs Test::Unit::TestCase
def test_args
implicit_hash(:foo = 'bar', :other_foo = 'other_bar')
end
def
Zeljko,
Possibly this could help, I believe the `getObject( how, what, types, value=nil
)` method could provide some more infromation to you with regards to this
matter:
=begin method=
# This is the main method for finding objects on a web page.
#
# This method is used
Please help me make a script that is going to make a background check of all
the persons in the list (filename:wanted.txt location c:\names) one by one.
If the person doesn't have a record, it will enter the next name.
If there's a record found, it will take 10 minutes before you can enter a
Maybe something like this:
ie = IE.start( http://serverName/BackgroundChecker.ext; )
myFile = File.new( C:\\names\wanted.txt, r )
lineArray = IO.readlines( myFile.path )
lineArray.each{ |line|
ie.text_field( :name, searchname ).set( line )
ie.button( :name, searchbutton ).click() #
Lauren wrote:
undefined method `button' for #Watir::Table:0xb698074 (NoMethodError)
This sounds like a bug in 1.4 that is fixed in 1.5. What version are you
using?
Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
Wow Carl,
What an awesome reply. I got code!! :)
No doubt I'm still doing something wrong...I'm getting the following error when
I run the code on my box though:
ruby MSNTest.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load --
Add a require for test unit at the top of the file:
require 'test/unit'
-c
On 2/8/07, Lauren [EMAIL PROTECTED] wrote:
Wow Carl,
What an awesome reply. I got code!! :)
No doubt I'm still doing something wrong...I'm getting the following error
when I run the code on my box though:
ruby
Like Charley said, the first form below is automatically understood by
ruby to imply the second. It is a feature of Ruby and there is nothing
special in the Watir library to make this happen.
Bret
ie.div(:name = 'foo', :index = 2).click
ie.div({:name = 'foo', :index = 2}).click
Thought i remembered it from the Pickaxe book, guess I did. :) If you check
out the bottom of the page on this link:
http://www.rubycentral.com/book/tut_methods.html
you'll find a reference to it - Collecting hash arguments. Passing curly
braces to a method can get confused with blocks, so this
You are better off initially just putting the names into a names.rb file.
Perhaps just declare a big array of names in another file and call it
from your code.
I know *why* you want to load from an external file, but in my experience
its best to keep this stuff simple for testing.
Once you are
I'll pick one nit here:
lineArray = IO.readlines( myFile.path )
lineArray.each{ |line|
For a very large myFile, you could have a problem holding lineArray in
memory. A better choice might be
myFile.path.each_line do |line|
process line
end
___
well, I'm not sure i fully understand what you're looking for but you have
some pseudocode:
open list
go through names
move to next record if person has no name
otherwise see if record is found
if record is found then wait a long time#this seems odd, but not
knowing your business domain,
Bret,
Thanks for your reply! HI am running Watir 1.4.1 - I wonder if that's
the problem!
I'll upgrade to 1.5 to see if that makes the difference. I know I've identified
all of the possible attributes using the toolbar and viewing the source. I just
couldn't figure out why it wouldn't
Agreed, nice nit. :) You can pick at the file line by line or if using YAML
as Richard mentioned, as a document by document separated in yml by dashes.
-c
On 2/8/07, Chris McMahon [EMAIL PROTECTED] wrote:
I'll pick one nit here:
lineArray = IO.readlines( myFile.path )
lineArray.each{
Hi,
I need to click OK button in the Logon Popup with the following details:
Window [004e0a92]
Title [Connect to qaone.v51test.com] ClassName [#32770]
Thread ID [0fcc] Process ID [0da0]
Size [width=326, height=282]
The problem is that Watir script is not executed, until
Lauren,
I use watir 1.4.1 but reviewing 1.5.1. I had a situation today where
.button(:name, ???).click did not work against our application. I changed
it to ie.button(:caption , ???).click and it worked.
Worth a try I guess.
Good luck!
Carl
Post more details, such as: Ruby version, Watir version, some of your [suspect]
code, as well as the error output you get after execution.
-
Posted via Jive Forums
I wanted to install watir 1.5. There are two versions of 1.5 with one-click
installers. Both are giving me errors on several of the files and then
completing the install with a install successful message. I previously had
watir 1.4.1 installed but used the uninstall.exe prior to installing 1.5.
Honestly, I would: uninstall Ruby remove physical Ruby directory reinstall
Ruby from command prompt: `gem install watir`
This is almost guaranteed to work, although I'm willing to be you could get
away with just a `gem install watir` from the command prompt without
uninstalling Ruby. For
Lauren,
I have concluded this week that working with the gems is the best way to
install watir. There are a few unit tests that are not perfect in my
environment, but gems are easier to manage.
I recommend uninstalling and grab the lastest gem. Then execute gem
install
I havent managed to catch up all on the threads in this message, but I was
thinking exactly what Bret was
Im also wondering if the com server has changed somehow, it
internetExplorer7.application or something
Im sure I used to know how to find out this stuff but it evades me today
-
Hi,
Is it possible to send an email with test results from Watir script?
Thank you
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6493messageID=18447#18447
___
I too got the same problem. Getting WIN32OLERuntimeError . Yesterday i
executed my scripts well but today morning when i come over here i got the
problem, I have installed dotnet frame work and Windows Vista upgrade advisor,
so is that any problem??
Now I uninstalled the dot net frame work and Windows Vista upgrade advisor.But
still i am getting the same problem, and even if i open the browser manually
and i execute the script the problem is happening. Getting the error and its
automatically opening the bulk of browsers. So is there any
I think I found out why. I have IE 7.0 on my machine. It looks like the title
of dialog box changes to Windows Internet Exploer. This may have caused the
script to break. I ran this test in another machine with IE 6.0. It works just
fine. I have Ruby 1.8.5 and Watir 1.4.1.
When I ran
You'll need an SMTP server, try Free SMTP server from
http://www.softstack.com/freesmtp.html
require 'net/smtp'
myMessage = END_OF_MESSAGE
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: My mail
Message body here
END_OF_MESSAGE
Net::SMTP.start('localhost') do |smtp|
smtp.send_message
41 matches
Mail list logo