[wtr-general] Re: getting connection error, can anyone help?

2012-05-10 Thread Tiffany Fodor
Hello!

Are you connecting to the internet through a proxy?

https://github.com/rubygems/rubygems/issues/267

Also, can you update gems individually, or is it just a problem with
trying to update everything?

-Tiffany

On May 10, 1:35 am, Sunflower  wrote:
> Hi,
> while updating the gems, i am getting the following error message. how
> can i proceed to update them?
>
> C:\>gem update --system
> ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
>     Errno::ECONNREFUSED: No connection could be made because the
> target machine actively refused it. - connect
> (2) (http://rubygems.org/latest_specs.4.8.gz)
>
> Could any one help me to do so?
>
> thanks,
> Sunflower

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Need urgent help

2012-05-09 Thread Tiffany Fodor
Hello!

I suspect that your results may be displayed within in a table.  I'd
find the name of that table and cycle through the links in that
table.  If more than the type of link you're looking for are in the
table, you may need to find something similar about all of them and
use an additional identifier, maybe with a regex, to just click the
ones you want.

Good luck!

-Tiffany

On May 9, 1:36 pm, Raghu k  wrote:
> Thanks. I see that  has a href for viewing the profile. How do i
> write the code to say that click on the href located  ONLY within the
>  tags
>
>  
>  
>   name="vcard-1" class="toggle-shared-connections trk-shared-conn-link
> trk-no-external" title="View your shared connections"> 1 strong> shared connection
>
>  ·
>  Similar
>
>  
>  
>
> On May 1, 9:21 pm, Chuck van der Linden  wrote:
>
>
>
>
>
>
>
> > On Monday, April 30, 2012 9:38:14 PM UTC-7, Raghu k wrote:
>
> > > In the HTML, there are lot of aref. I want to pick the aref that
> > > resemebles like  > Are you referring to anchor tags? (aka Links) which take the form of
> > {bunchof stuff}  or   and contain an href
> > attribute?
>
> > You have only shown us part of the HTML for the A tag, and nothing that
> > surrounds it, so  that makes it very hard to answer your question.
> > Normally you can use some attribute of the A tag, and ID or Name or Class,
> > or the text or image that is shown to the user.  Unfortunately your sample
> > shows none of these things, but I also do not see the closing > so I've no
> > idea if you have actually included the entire content of the tag.  Another
> > option is the value for the href itself or a part of it (if that is unique
> > on the page).
>
> > The first question to ask yourself is 'if I was interacting manually, how
> > would I know which link I wanted to click.  The answer to that will often
> > lead you to a good means to identify the link you want.  This may end up
> > being some other nearby object, such as perhaps another cell on the same
> > row of a table.
>
> > Since we cannot read your mind, and nor do I have the psychic power of
> > remote viewing to see your website or screen, we need more information in
> > order to assist you.  Without a larger sample of HTML, and if you can an
> > answer to 'how you would know which one to click when testing manually?',
> > it's hard to give you an exact sample of code that might do what you want.
>
> > > On Apr 24, 2:53 am, Chuck van der Linden  wrote:
> > > > I don't have html for your site, but if there is some predictable
> > > container
> > > > such as a div with an id like 'results'  then you could do something
> > > like
> > > > this  (also presumes the only links inside the results are to actual
> > > > results, and not things like upvotes etc.. in that case you may need to
> > > be
> > > > more stringent in identifying the link to be clicked, for guidence there
> > > we
> > > > would HAVE to see sampleHTML. )
>
> > > >  do your search
> > > >  10.times do |i|
> > > >     browser.div(:id => 'results).link(:index => i).click
> > > >      (whatever you need to do with the resulting page if anything)
> > > >    browser.back
> > > >   end
>
> > > > If you need to do more than the first page of results, then wrap that
> > > loop
> > > > in something that clicks the 'next page' link as many times as you need
> > > to.
>
> > > > Note: unless you work for the company that makes the site, please be
> > > sure
> > > > to check their terms of service, many of them forbid automated access,
> > > > especially link scraping etc) without prior written permission, or
> > > restrict
> > > > such access to authorized users of their API and demand it be done via
> > > the
> > > > api.
>
> > > > On Monday, April 23, 2012 6:51:57 AM UTC-7, Željko Filipin wrote:
>
> > > > > On Sat, Apr 21, 2012 at 10:42 PM, Raghu k 
> > > wrote:
> > > > > > Something like ths would help .. Please help me with a quick code...
>
> > > > > Is there a problem with the code you have posted?
>
> > > > > Željko
> > > > > --
> > > > > watir.com/book - author- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Read data from excel sheet in watir 3.0.0 using XLS class

2012-05-03 Thread Tiffany Fodor
Hello!

I haven't tried with Watir 3.0 yet, but when I upgraded my ruby
version, I found I needed to supply the path to the Xls.rb file to
require it.

Try something like this:

require 'c:\\folder_where_Xls_is\\Xls.rb'

Hope this helps!

-Tiffany

On May 3, 10:35 am, Aarthi  wrote:
> Hi,
>
> I have used the XLS class to read from an excel file. I had used it
> with Watir 1.6.5 When I try to reuse the same with Watir 3.0.0, I get
> a Load Error. Is there a way to use this in 3.0.0 or has this become
> redundant?
>
> Error information:
>
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require': cannot load such file -- xls (LoadError)
>         from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/
> custom_require.rb:36:in `require'
>         from Login_Suite.rb:11:in `'
>
> My code:
>
> require "rubygems"
> require "test/unit"
> require "win32ole"
> require "watir"
> require "logger"
> #require "watir/screen_capture"
> require "xls"
> require "site_login.rb"
>
> #include Watir::ScreenCapture
> include Test::Unit::Assertions
>
> begin
>     $inputFile = XLS.new("C:\\TestSetUp.xls")
>     $setupInfo = $inputFile.getHash("B5:C8", "TestSetUp") #get test
> setup information from the Setup tab in the spreadsheet
>     $runTests = $inputFile.getHash("B12:C18", "TestSetUp") #get which
> tests to run from the Setup tab in the spreadsheet
>     ensure
>     $inputFile.close
> end
>
> #assign login data to variables
> $url = $setupInfo["Website"]
> $username = $setupInfo["User Name"]
> $password = $setupInfo["Password"]
> $browserSelected = $setupInfo["Browser"]
>
> #~ Creating LogFile
> @time = Time.now.strftime("%m%d%Y")
> fileName="C:\\ScriptLogs\\Log_" + @time + ".log"
> $log = Logger.new(fileName)
>
> #~ Creating a new Browser Instance
> Watir::Browser.default = $browserSelected
>
> #~ Navigating and signing in to the URL
> $browser = Watir::Browser.start($url)
> $browser.maximize
>
> class TestSuite < Test::Unit::TestCase
>         def test01_Login
>                 if $runTests["Login"] == "Yes"
>                         puts "> Executing Login Test."
>
>                         $loginStatus = site_login($username,$password)
>                         if $loginStatus == "Pass"
>                                 puts "Login Test successful"
>                                 $log.info "Successfully completed Login test"
>                         else
>                                 puts " ERROR *"
>                                 puts "    Login Test FAILED   "
>                                 puts ""
>                                 puts "Check C:\\ScriptLogs\\ for Error log"
>                         end
>                 else
>                         puts "...> Bypassing login test"
>                 end
>         end
> end

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Test Automation Bazaar - Charity Workshops

2012-02-29 Thread Tiffany Fodor
Hi all!

To kick off the Test Automation Bazaar in Austin on March 23-24 and to
benefit local charities, the Watir team is putting on a couple of
workshops on March 22.

If you've been thinking about joining us at the Test Automation
Bazaar, here's another reason to sign up!

For more information or to sign up for the charity workshops check out
the Charity Workshops page at watir.com:  
http://watir.com/test-automation-bazaar/charity-workshops/

-Tiffany

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: I'm a ruby programmer, would like to join your group. Thank you.

2012-02-27 Thread Tiffany Fodor
Hello and welcome!

You should be all set now - please respond here if you would like me
to change your email preferences.

-Tiffany

On Feb 26, 8:51 pm, mentgomery  wrote:
> FYI.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: unable to click the through watir. 选项

2012-01-05 Thread Tiffany Fodor
Hi Finley,

I don't think you can specify more than two parameters for an element.

Does the click work when you use this?

@ie.span(:id => 'mx1e63400f').click

Does the button click work?  (Not sure if this was an attempt to click
the span or if it's just the next line of code.)

It could be that there's associated javascript that needs to be fired,
but I don't see it in your html code.

Hope this helps!

-Tiffany

On Jan 5, 8:17 pm, Finley  wrote:
> Hi,
>
>    I am trying to click on a span in my web page. Although it can
> click,
>
> it event cann't tigger.
>
> Here is the code
>
>  mxevent="click" targetid="mx1e63400f" ev="goto" tabindex="0"
> ctype="label">
>
>  @ie.span(:id => "mx1e63400f",:class => "text powerwhite",:ev =>
> "goto").click
>  @ie.button(:id,"mx1e63400f").click
>
>  Please Help,
>  Finley

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Best practice for using Active Directory user/pass for script?

2011-11-14 Thread Tiffany Fodor
Hi Deepu!

This should probably be a new thread rather than a question added to
an existing thread.

That being said, Watir is a library for interacting with web
applications, it doesn't care where you get the data you're using for
driving you tests.  Getting data from another source (Excel, database,
etc) is handled with other Ruby libraries.

I've had a lot of success using David Mullet's 'Ruby on Windows' blog
for advice on interacting with Windows applications.

http://rubyonwindows.blogspot.com/

Hope this helps!

-Tiffany

On Nov 14, 10:14 am, Deepu V nair  wrote:
> Hi,
>
> I am pretty new to Watir and have few doubts.
>
> 1. Can watir read data from Excel ? Give me a Sample case
> 2. Can watir read data as well as object details from excel and put in the
> script . Example i have an example with the page link( saywww.google.com)
> , Object details ("q") and values ("pixaxe")
> and i want call all these details in excel
>
> ie.text_field(:name,"q").set("Revolution") please convert this statement in
> such a way that my doubt will be clarified.
>
> PS: Note that i am new to watir so please use simple example and simple
> explanation
> Thanks in advance
> Deepu V
>
>
>
>
>
>
>
> On Mon, Nov 14, 2011 at 10:42 PM, Adam Reed  wrote:
> > Edit/Update:  I have handled this in other cases by including a flat
> > file in Subversion with the variable names for user/pass, but no user
> > information.  In order for the script to run, the user (me) has to add
> > their credentials to the file and make sure not to check it back into
> > Subversion once changes are made.  Is that as good as it gets?
>
> > On Nov 14, 10:55 am, Adam Reed  wrote:
> > > This started out as an encryption question, but it may end up being a
> > > testing best practice question.  I have an application that is not
> > > customer-facing, so new accounts cannot be created.  It uses personal
> > > Active Directory information, and we have no (nor are we allowed to
> > > obtain) test accounts for Active Directory.
>
> > > I have a personal account that can access the content to be tested,
> > > but I do not want my AD password to be easily obtained.  I am using
> > > Jenkins to launch scripts so I can easily prompt the user for a
> > > password and store it in a variable to be used... but I know how easy
> > > it would be to then log these passwords to a flat file.  I'd like to
> > > provide more security for coworkers if I'm setting up a system that
> > > accepts user input (instead of using my own as an encrypted master for
> > > the script).
>
> > > The test case is pretty standard - log in, assert a few features and
> > > functions and that's it.  I looked into AES encryption thinking that I
> > > would encrypt the password manually and then take the encrypted string
> > > and paste it into a decrypt function in the script... but that
> > > function would obviously list the decryption keys so it's really only
> > > adding a step of obfuscation to the process of retrieving the
> > > password.
>
> > > What's the best practice for this scenario?
>
> > > Thanks,
> > > Adam
>
> > --
> > Before posting, please readhttp://watir.com/support. In short: search
> > before you ask, be nice.
>
> > watir-general@googlegroups.com
> >http://groups.google.com/group/watir-general
> > watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Watir recorder sharp

2011-11-03 Thread Tiffany Fodor
Hi Cynthia!

The Watir team doesn't really endorse the use of or support
recorders.  I'd recommend you pose you question to the recorder team.

Just as a guess, I'd say you probably need to run your command prompt
in Windows 7 with administrator privileges.

Best of luck!

-Tiffany

On Nov 3, 10:38 am, "cynthia.math...@jud.ct.gov"
 wrote:
> I can record scripts, however when I try to play them back on machine
> with xp professional it doesn't open the browser and step, it launches
> c:\ruby\bin\ruby.exe.  When I try to run it on my win 7 machine, I
> receive teh following error Watirrecordersharp\temp.rb is denied.
> Please let me know what I need to do to resolve these two errors.
>
> Cynthia

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Unable to click tab in IE/FF

2011-10-14 Thread Tiffany Fodor
Hi!

I agree with Zeljko, we can't give an informed answer without example
html, but here are some 'stabbing in the dark' suggestions to try.

You may be able to click on the div, link or span more simply:

ie.link(:text, 'span text').click
ie.span(:text, 'span text').click
ie.div(:id, 'dividname').click

Also, we don't know what your problem is.  Do you get an error message
or does nothing happen?

If nothing happens, you may want find out if there's an associated
javascript event you need to fire:
ie.link(:text, 'span text').click
ie.link(:text, 'span text').fireEvent('my_javascript_event')

I hope this helps, but if it doesn't, you'll need to provide us with
some more specifics.

-Tiffany
On Oct 14, 5:36 am, ashitha shetty  wrote:
> Hi,
>
> I am facing problem on clicking tabs.
>
> below is my code:
>
> ie.link(:id,"idname").span(:text,"span text").click
>  or
> ie.div(:id,"dividname").span(:text, "Span text").click
>
> Any help would be appreciated.
>
> Thanks

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Handling "Choose a digital certificate"

2011-09-28 Thread Tiffany Fodor
Hi Bala!

One of the applications I test uses a digital certificate, but I just
install it manually on the machines I use for automated testing.
After that first install, I'm not prompted to install it again until
the certificate changes.

Apologies if your implementation is different or if you want to test
the certificate installation with Watir.

-Tiffany

On Sep 28, 8:46 am, bala  wrote:
> Hi, Thanks for the help. I am now able to access the certificate
> window. But could not figure out how to navigate and select one
> certificate. can you please help me here.
>
> On Sep 28, 3:26 pm, Super Kevy  wrote:
>
>
>
>
>
>
>
> > Please checkhttp://rubygems.org/gems/rautomation
> > And search the group for rautomation
> > Alternately there are a number of methods using autoIT

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Unable to open browser.

2011-07-26 Thread Tiffany Fodor
Hi Sachin!

Two of your lines are commented out - has that always been the case?
Also, you're assigning the @browser variable twice, which will launch
two browser sessions and the second (which will be on google.com) will
be assigned to @browser.

Both of your un-commented lines of code should work on their own -
have you tried them in IRB?  If so, what was the result?  Can you
please include which line number of your method is failing?

-Tiffany

On Jul 23, 1:11 am, sachin marne  wrote:
> Hi,
>
> I am new to watir. thefollwing method was working fine before.But
> suddenly i am getting this error message.
>
> def visit
>     @browser = Watir::Browser.new
>     @browser = Watir::Browser.start("http://google.com";)
>      #...@browser.start('http://google.com')
>       #...@browser.goto('http://google.com')
> end
>
> on calling this method i m getting following error message.
>
> WIN32OLERuntimeError: failed to create WIN32OLE object from
> `InternetExplorer.Application'
>     HRESULT error code:0x80004005
>       Unspecified error
>
> NoMethodError: undefined method `goto' for nil:NilClass
>
> please help me.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Write to Excel

2011-06-10 Thread Tiffany Fodor
Hi Mark!

I also use the Xls interface to read from Excel, but I use win32ole to
write to Excel.  Here's where I learned how to do it:

http://rubyonwindows.blogspot.com/2007/03/automating-excel-with-ruby.html

David Mullet's Ruby on Windows blog has tons of great tips for using
Ruby on Windows PCs.

Hope this helps!

-Tiffany

On Jun 10, 9:41 am, mdwin01  wrote:
> Hi-
>
> Can someone help me write to Excel?  I'm using 'xls' Excel interface
> to read from excel, but writing to it throws errors:
>
>   1) Error:
> test_SearchNews(TC_YahooFinance):
> WIN32OLERuntimeError: Range
>     OLE error code:800A03EC in 
>       
>     HRESULT error code:0x80020009
>       Exception occurred.
>     ./xls.rb:263:in `method_missing'
>     ./xls.rb:263:in `write2DArray'
>     C:/ruby/XLS/SearchNews5.rb:35:in `test_SearchNews'
>     C:/ruby/XLS/SearchNews5.rb:19:in `each'
>     C:/ruby/XLS/SearchNews5.rb:19:in `test_SearchNews'
>
> Here's my code:
>
> require 'xls'
> require 'watir'
> xlFile = XLS.new('C:\MyFile.xlsx') #grab the data file;
> myData = xlFile.getRowRecords("Symbol","Sheet1")  #pull data records
> from Range, Woksheet
>
> myData.each do |record|
>
>   #Define records in the spreadsheet
>   what = record["Symbol"]
>   #Search news
>   if @@ie.text.match(/keyword1/i)
>     xlFile.write2DArray("1", "keyword1", "Sheet1")
>     puts "1 keyword1 found***"
>   else
>     puts "0 keyword1 not found"
>   end
> xlFile.close
> end
>
> This works:
> xlFile.getRowRecords("Symbol","Sheet1") #range, worksheet
>
> This does NOT work:
> xlFile.write2DArray("1", "keyword1", "Sheet1") #value, range,
> worksheet
>
> Note that range is just a string found in my Excel sheet, so I have a
> column header with "Symbol" and "keyword1"
>
> Thank you,
>
> Mark

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Convert a html file into well formed XML

2011-06-01 Thread Tiffany Fodor
Hi Saurabh!

This group is specifically for Watir and your issue seems to be a
general Ruby question.

If purchasing the chilkat library isn't an option, I'd suggest you
post your question in a Ruby forum.

These are just guesses, but you might also check out nokogiri, rexml
or hpricot.

Good luck!

-Tiffany

On Jun 1, 7:54 am, Saurabh Gupta  wrote:
> Hello,
>
> I am trying to convert an HTML file into XML, and i did that using the
> chilkat selenium which has predefined library for it.
>  link for chilkathttp://www.chilkatsoft.com/ruby.asp.
>
> But the problem it is a trial version and after 30 days it gets locked
> and not able to work on a particular system. SO i need something which
> not required any license to convert a html file into xml.
>
> Please reply as soon as possible, i need it urgently.
>
> Thanks in Advance
> Saurabh Gupta

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: finding input by xpath

2011-04-20 Thread Tiffany Fodor
Hi Basim!

Watir uses symbols to specify element parameters, so where you were
matching on "xpath", you'd really need to match on :xpath.  Also,
instead of specifying only the element parameters as a variable, you
may want to specify the entire element.

Try something like this:

$edit_descriptions["pwd"] = @b.text(:xpath => "//input[@type='text']
[1]")

to define your element and then

puts $edit_descriptions["pwd"].value

to get the value from it.

Hope this helps!

-Tiffany



On Apr 19, 2:13 pm, Basim Baassiri  wrote:
> Hello
> I have the following input fields
> 
> 
> 
>
> and since there is no html id or name, I'm using xpath to find the 2nd input
> field
>
> here is my xpath expression that I'm using
> //input[@type='text'][1]
>
> here is some of the code
> $edit_descriptions["pwd"] = { "xpath" => "//input[@type='text'][1]"  }
> puts @b.text_field($edit_descriptions["pwd"]).value
>
> This is the exception I'm getting
>
> -- ruby.exe --
> D:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/locator.rb:175:in
> `match?': xpath is an unknown way of finding an  element
> (//input[@type='text'][1])
> (Watir::Exception::MissingWayOfFindingObjectException)
> from
> D:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/locator.rb:28:in
> `match_with_specifiers?'
> from
> D:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/locator.rb:26:in
> `each'
> from
> D:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/locator.rb:26:in
> `match_with_specifiers?'
> from
> D:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/locator.rb:163:in
> `locate'
> from
> D:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/locator.rb:154:in
> `each'
> from
> D:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/locator.rb:154:in
> `locate'
> from
> D:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/container.rb:865:in
> `locate_input_element'
> from
> D:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/input_elements.rb:5:in
> `locate'
> from
> D:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/element.rb:55:in
> `assert_exists'
> from (eval):2:in `value'
> # how={"xpath"=>"//input[@type='text'][1]"} what=nil>
>
> Output completed (6 sec consumed) - Normal Termination
>
> Any ideas on where I'm going wrong with my xpath expression (I've looked at
> the example unittests also) or is there another solution to my problem?
>
> Basim

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Skip blank rows

2011-04-18 Thread Tiffany Fodor
Hi!

You're almost there.

I use Xls.rb as well and to check for blank rows, I usually use
something like this:

myData.each do |record|
  if record['WHERE'] != ''
ie.frame(:name, "main").text_field(:name,
'account').set(record['WHERE'])
ie.frame(:name, "main").text_field(:name,
'item').set(record['WHAT'])
  end
end

This will skip rows where the 'WHERE' column is blank.

I can't tell how many rows you're importing from your code, so if
you're not already, you may want to limit the number of rows you're
importing from Excel.  I usually bring back about 5-10 rows past where
my data ends so that if I add a couple more rows, I won't have to
change the import range from Excel.  You don't want to bring back all
the rows in the spreadsheet or your framework will need to check each.

Hope this helps!

-Tiffany


On Apr 15, 4:09 pm, mdwin01  wrote:
> Hi-
>
> Could someone help me figure out how to skip over blank Excel rows
> (where the first item in the array is "" or length=0) and continue to
> the next row?  I use xls.rb 
> (http://wiki.openqa.org/display/WTR/Excel+interface+class
> ) to read Excel workbook cells that each contain a formula, where
> everything defaults to "" or zero length blank.
>
> Here's a sample xls (note how second to the last row appears blank):
> Import
> WHERE   WHAT
> Account1        Apple
>
> Account3        Orange
>
> Here's a snippet of my code:
>
> require 'xls'
> require 'rubygems'
> require 'watir'
>
> ie = Watir::IE.attach(:url, 'http://www.blah.com) #reuse existing
> browser window
>
> #Open Excel file, Import worksheet
> xlFile = XLS.new('C:\MyFile.xls') #grab the data file
> myData = xlFile.getRowRecords('Import','Import')  #pull data records
> from Excel
> xlFile.close
>
> myData.each do |record|
>
>   #need something that says if record['WHERE'] = "" or 0 length then
> skip to next row
>   ie.frame(:name, "main").text_field(:name,
> 'account').set(record['WHERE'])
>   ie.frame(:name, "main").text_field(:name,
> 'item').set(record['WHAT'])
>
> end

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: how to change value of Watir::Input?

2011-04-12 Thread Tiffany Fodor
Thanks Jari!

I guess I'd better learn more about Watir-Webdriver soon!

-Tiffany

On Apr 10, 11:32 pm, Jari Bakken  wrote:
> On Fri, Apr 8, 2011 at 12:54 PM, bryan  wrote:
> > Hi,
>
> > If I have an element of type Watir:Input how should I set the value -
> > I would like to not use textfield (unless there is someway I can
> > easily convert Watir:Input to a Watir:TextField and then do a set on
> > it.
>
> If this is in the context of watir-webdriver, you can do:
>
>   browser.input(:name => "foo").to_subtype.set("bar")
>
> Tiffany: This is an addition in watir-webdriver, where you can use
> browser.input in addition to the normal file_field, text_field etc.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Rubygems 1.7.2 is out: for those with invalid value for @cert_chain issue

2011-04-08 Thread Tiffany Fodor
Thanks Charley!

I was getting lots of warning messages on a couple of my PCs about
this, but didn't have time to troubleshoot them.  Since everything
still worked, I decided to wait until I had more time to go down that
rabbit hole.  I upgraded one of them and it's all better now - thanks
for saving me several hours of trying to figure out what the problem
was!

-Tiffany

On Apr 5, 5:21 pm, Charley Baker  wrote:
> Announcement is 
> here:http://rubyforge.org/pipermail/rubygems-developers/2011-April/006373
>
> Charley Baker
> Lead Developer, Watir,http://watir.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: how to change value of Watir::Input?

2011-04-08 Thread Tiffany Fodor
Hey Bryan!

I'm not sure I understand your question, but I'll give it a shot.  You
have an input element and you're not sure what type of input it will
be because it's returned by a method that matches one of the element's
parameters to a regex?

To set a value in an element, you need to know what type it is.  There
are several types of elements that accept input, so you may need to
write some conditional statements to figure out what your element is.

For example, if your element's id is a regex looks like this: /
my_text/, and you expect to get a text_field, select_list, or a
file_field:

if browser.select_list(:id, /my_text/).exists?
  browser.select_list(:id, /my_text/).select('The option I want to
set')
elsif browser.text_field(:id, /my_text/).exists?
  browser.text_field(:id, /my_text/).set('The text I want to set')
elsif browser.file_field(:id, /my_text/).exists?
  browser.file_field(:id, /my_text/).set("//path_to_my_file")
end

If I didn't understand your question correctly, please provide more
information in the form of your Watir code or html for the app you're
testing.

Hope this helps!

-Tiffany

On Apr 8, 4:54 am, bryan  wrote:
> Hi,
>
> If I have an element of type Watir:Input how should I set the value -
> I would like to not use textfield (unless there is someway I can
> easily convert Watir:Input to a Watir:TextField and then do a set on
> it.
>
> The reason is that the field is returned by a generic function we
> return that does a lot of work trying to find an element that matches
> an expression, in this case it finds the correct element and returns
> it but it turns out to be a Watir:Input when returned not a
> Watir:TextField...
>
> Thanks,
> Bryan Rasmussen

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: checkbox question

2011-04-08 Thread Tiffany Fodor
Sorry Bryan,

I thought you were looking for Selenium help.

Jari,

I'm fine with fielding Watir-Webdriver questions here and on Stack
Overflow.  I was sending Bryan to the Selenium group because I thought
he was asking about Selenium-Webdriver issues.  I think adding a Watir-
Webdriver site might just confuse things.

What does the group think?

Thanks!

-Tiffany

On Apr 7, 5:22 pm, Jari Bakken  wrote:
> On Thu, Apr 7, 2011 at 1:25 AM, bryan  wrote:
>
> > When I look for the label Regnskab I find it, but when I run the
> > label.checkbox(:index, 1) I get
>
> >  And I click "Regnskab"                                              #
> > features/step_definitions/general_navigation.rb:61
> >      unable to locate element, using
> > {:index=>1, :tag_name=>"input", :type=>"checkbox"}
> > (Watir::Exception::UnknownObjectException)
>
> > Any particular explanation on this?
>
> I think this is because watir-webdriver is 0-indexed, not 1-indexed
> like Watir. That's one of the major changes, you'll find a list of
> more here:
>
>  https://github.com/jarib/watir-webdriver/wiki/Comparison-with-Watir-1.X
>
> Jari

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: checkbox question

2011-04-07 Thread Tiffany Fodor
Hi Bryan!

While Watir and Selenium are both moving to Webdriver to work with
various web browsers, they are completely different projects.

Alister Scott has some great blog posts that talk about Webdriver,
Watir and Selenium:

http://watirmelon.com/2010/04/10/watir-selenium-webdriver/

This is the Watir support site.  Here is the Selenium support page:

http://seleniumhq.org/support/

Good luck with your Selenium project!  If you ever need Watir help,
you know where to find us.  :)

-Tiffany



On Apr 7, 2:25 am, bryan  wrote:
> Hi,
> Newbie with selenium with watir webdriver...
>
> I have the following code( I have omitted code I suppose is less
> likely to be relevant):
>
> label = $browser.label(:text, what)
>   if label.exists?
>     if label.for.blank?
>       puts "no 'for' attribute, will try first content" if $DEBUG
>       begin
>         puts "trying checkbox"
>         return label.checkbox(:index, 1)
>       rescue
> ...
>
> And content like this
>
>  value="2">Regnskab
>
> When I look for the label Regnskab I find it, but when I run the
> label.checkbox(:index, 1) I get
>
>  And I click "Regnskab"                                              #
> features/step_definitions/general_navigation.rb:61
>       unable to locate element, using
> {:index=>1, :tag_name=>"input", :type=>"checkbox"}
> (Watir::Exception::UnknownObjectException)
>
> Any particular explanation on this?
>
> In case I can't find a solution on this I was thinking to use xpath -
> can someone give me an example of doing the above with xpath in
> selenium using watir webdriver?
>
> Thanks,
> Bryan Rasmussen

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Watir day and Selenium Conf

2011-02-07 Thread Tiffany Fodor
I just registered and booked a room about a block away at the
Chancellor because it was recommended on Expedia and I got a good
deal.

Please let me know if there is anything I can do to help.

See you there!

-Tiffany

On Feb 5, 1:22 am, Željko Filipin 
wrote:
> On Sat, Feb 5, 2011 at 12:26 AM, Tiffany Fodor  wrote:
> > I think I'm going to be able to attend and I'm looking at scheduling
> > my flight and hotel now.  Is everyone pretty much staying at the same
> > hotel?  If so, which one?
>
> I did not book anything yet. I was thinking about "Marines’ Memorial Club &
> Hotel" since it is recommended 
> athttp://www.seleniumconf.com/venue/#accommodation
>
> Željko

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Watir day and Selenium Conf

2011-02-04 Thread Tiffany Fodor
I think I'm going to be able to attend and I'm looking at scheduling
my flight and hotel now.  Is everyone pretty much staying at the same
hotel?  If so, which one?

Thanks!

-Tiffany

On Feb 3, 2:28 pm, Charley Baker  wrote:
> Hi all,
>
>   Bret and I are leading up a Watir Day which will be Sunday April 3rd
> in San Francisco as part of the Selenium Conference. You can find out
> more information here on Watir day:http://watir.com/watir-day/  and
> the  Selenium Conference:http://www.seleniumconf.com/.
>
> We're excited to have the two teams work together and focus on
> Automation Testing. Whether you're using Selenium or Watir, we would
> love to have you attend this conference. We are looking for sponsors
> for Watir Day and will have information up soon on more details about
> the conference and booking tickets. Feel free to reach out to us on
> sponsoring or other questions you might have. We will be updating the
> page as we have more information.
>
> Follow us on twitter: @watir for the latest annnouncements. We'll have
> an rss feed on the page as well. I hope to see many of you there.
>
> Cheers,
>
> Charley Baker
> Lead Developer, Watir,http://watir.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Data Driven testing

2010-12-07 Thread Tiffany Fodor
Hi Kay!

You may have already found this in your search, but the Ruby on
Windows blog has really helped me:

http://rubyonwindows.blogspot.com/

Hope this helps!

-Tiffany

On Dec 6, 9:50 am, Kay  wrote:
> Cheers Dave.
>
> @Zelijko: cannot use Roo as I am using Jruby.
>
> Cheers,
> Kay
>
> On Dec 6, 2:32 pm, Dave McNulla  wrote:
>
> > Kay,
>
> > I would recommend against validating data unless it's absolutely
> > necessary. You should be able to submit the data that will support the
> > test you are running then you run the test, then you clean up the
> > data. The first and last steps may be done through sql commands, API
> > calls, or web services calls. What does this give you? Knowledge that
> > failures are in the software and not in the a change to the "sample
> > data". You also don't have to worry about "burned data", which could
> > be quite the problem if you are working in getting your tests right to
> > begin with.
>
> > Of course that depends on cooperation and trust in the test teams.
>
> > Good luck,
>
> > Dave
>
> > On Dec 6, 6:19 am, Kay  wrote:
>
> > > Thanks Zelijko, will look at it.
>
> > > Cheers,
> > > Kay
>
> > > On Dec 6, 9:34 am, Željko Filipin 
> > > wrote:
>
> > > > On Sun, Dec 5, 2010 at 10:58 PM, Kay  wrote:
> > > > > The test data is provided by a seperate data
> > > > > team to us in the form of excel spreadsheet
>
> > > > Watir "just" drives browser(s). It does not know anything about Excel. 
> > > > There
> > > > are other tools that know about it, for example roo[1].
>
> > > > Watir is "just" a Ruby library (Ruby is programming language). Google 
> > > > for
> > > > "excel ruby" (without quotes) and you will probably find something.
>
> > > > [1]http://roo.rubyforge.org/
>
> > > > Željko
> > > > --
> > > > watir.com - community manager
> > > > watirpodcast.com - host
> > > > testingpodcast.com - audio podcasts on software testing. all of them

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: some more details on CSS

2010-12-07 Thread Tiffany Fodor
Hi!

Can you please provide some detail about the issue you're having?  If
you're having trouble with the tutorial, can you specify where it's
losing you?  None of us has the time to create a new tutorial here in
Watir General, but if we understand your problem or where the tutorial
falls short, we may be able to update it.

Thanks!

-Tiffany

On Dec 7, 11:43 am, Hrishikesh Bose  wrote:
> hello guys, can someone give me more tut of how to use CSS. not able to
> understand the tut available in watir 
> sitehttp://wiki.openqa.org/display/WTR/CSS

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Can't click on a nameless div

2010-12-07 Thread Tiffany Fodor
Hi!

Is this the only instance of the 'Add Another State' text?

Maybe you've tried more than the code you listed, but if you haven't,
you may be making this harder than you need to.

Have you tried just accessing it as a span or link?

ie.link(:text, 'Add Another State').click
ie.span(:text, 'Add Another State').click

Hope this helps!

-Tiffany

On Dec 7, 3:21 pm, LizLeong  wrote:
> I'm running Ruby1.8.7 patchlevel 249 with Watir 1.6.7 on WinXP.
>
> I'm trying to click on the text "Add Another State" on a web page.  It
> looks like a link, but I am having trouble hooking onto it.
>
> The structure is:
> 
>   http://www.website.com/
> insert" method="post">
>      
>         
>         
>                 
>                         Text - Add Another State
>                  Text - Empty Text Node
>
> I've tried the following unsuccessfully.  I tried to use flash also
> and didn't see anything highlighted either.
> ie.div(:class=>"mainModule").div(:text=>"Add Another State").click
> ie.div(:class=>"mainModule").div(:href=>"#").click
> ie.span(:text,"Add Another State").link(:text,"Add Another
> State").click
>
>  Maybe there's no way to do what I want, even knowing that would
> help!

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Problem finding a way to access a link

2010-08-12 Thread Tiffany Fodor
Hi!

I've run into cases where what I thought was a link was actually a
span.  Do any of the link commands you tried work at a span instead?

Just a shot in the dark, but I hope it helps!

-Tiffany

On Aug 12, 1:18 pm, orde  wrote:
> If at all possible, try to get a developer to add an id tag (or some
> unique element attribute like name or value) to the href so that you
> can locate it more easily.
>
> Otherwise, you could try something like this:
>
> $browser.link(:href, /some_unique_part_of_href/).click
> or
> $browser.link(:href, /some_unique_part_of_href/).fire_event('onclick')
>
> Hope it helps.
>
> orde
>
> On Aug 12, 11:14 am, Melissa  wrote:
>
> > I'm trying to get my Watir test to click the link below, and I'm
> > coming up empty. I've tried accessing it by text, href, title, cell,
> > table, link index and anything else I could think of. It's such messy
> > code - I'm starting to wonder if it's even possible to get at it.
>
> > Any thoughts on what I can use to click the link? Thanks for any tips!
>
> >  > bgcolor="#efefe7" align="center" style="font-size:90%;border-
> > right:#94a6ce 1px solid;padding-right:4px;border-top:#94a6ce 1px
> > solid;padding-left:4px;border-left:#94a6ce 1px solid;width:
> > 100px;color:black;border-bottom:#FF9900 1px solid;font-
> > family:tahoma;height:20px;background-color:#efefe7;text-
> > align:center;text-decoration:none;">
> >  > href="javascript:document.aspnetForm.__ctl00_TemplateBody_DesignShell1_ctl0 
> > 0_ctl00_SectionTabStrip_State__.value='1';__doPostBack('ctl00$TemplateBody
> > $DesignShell1$ctl00$ctl00$SectionTabStrip','1')">
> > Sources
> > 

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: How to access element in a table ?

2010-07-27 Thread Tiffany Fodor
I think you should be able to access the link as an element in the
table cell:

ie.table(:id, "uwmMainMenu_MainM" )[2][1].link(:text, 'Quick
Search').click

or, if you assign your element to a variable:

my_cell = ie.table(:id, "uwmMainMenu_MainM" )[2][1]
my_cell.link(:text, 'Quick Search').click


-Tiffany

On Jul 27, 2:25 pm, Chan Nguyen  wrote:
> Hello Tiffany,
> Thanks for your help. I actually did go through that example, but in that
> "cell" there are a list of options that I have to pick one:
> - Quick Search
> - Saved Search
> - Standard Search
> ...etc
> and there is no "click" option for a cell. I really struggle with this :( !
> Can you give me some more hints?
>
> Thanks,
>
> On Tue, Jul 27, 2010 at 1:22 PM, Tiffany Fodor  wrote:
> > Hi!
>
> > The Watir Cheat Sheet (http://wiki.openqa.org/display/WTR/Cheat+Sheet)
> > has an example of working with table elements:
>
> > td = browser.table(:name, 'recent_records')[2][1]
>
> > td is now the cell at row 2, column 1 of your table.
>
> > There's more information on the Table class in the Watir API
> > reference:
>
> >http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Table.html
>
> > Hope this helps!
>
> > -Tiffany
>
> > On Jul 27, 2:04 pm, Chan Nguyen  wrote:
> > > Hi Basim,
>
> > > Thanks a lot for your quick response. I just found out that element is
> > > actually a table.
> > > I accessed to a particular table like this :
> > > my_table = ie.table( :id, "uwmMainMenu_MainM" )
>
> > > Next, I need to access the each element of the first row of this table,
> > but
> > > I got stuck at this point.
> > > Could you give me a minimal example to access "table"? Further, I don't
> > know
> > > how to "click" an option in this list?
>
> > >http://i235.photobucket.com/albums/ee62/rox_rook/Ex-1.gif
>
> > > On Tue, Jul 27, 2010 at 12:59 PM, Basim Baassiri 
> > wrote:
> > > > Hi Chan
>
> > > > You can try and use firebug to identify element
> > > >http://getfirebug.com/downloads
>
> > > >  <http://getfirebug.com/downloads>Basim
>
> >  > > On Tue, Jul 27, 2010 at 3:17 PM, Chan Nguyen 
> > wrote:
>
> > > >>  down vote  favorite
>
> > > >> Hi everyone,
>
> > > >> I'm current writing a test script for our MLS( Multiple Listing
> > > >> System ) systems. The website is mainly written in C# .NET. Here is
> > > >> the screenshot that I got:
> > > >>http://i235.photobucket.com/albums/ee62/rox_rook/Ex-1.gif
>
> > > >> And this is the HTML source:
> > > >>  > > >> equiv="Content-Type" content="text/html; charset=utf-8">
>
> > > >>  > > >> sizset="1"> > > >> action="Menu.aspx?hidMLS=SDNA" sizcache="33" sizset="1"> > > >> id="divControlPanel" class="ControlPanel" sizcache="33"
> > > >> sizset="1"> > > >> sizset="1"> > > >> sizset="1">
>
> > > >>  > > >> id="uwmMainMenu_MainM" onmouseup="javascript:igmenu_mouseup(this,
> > > >> event);" onselectstart="javascript:igmenu_selectStart();"
> > > >> class="WebMenu" onmouseover="javascript:igmenu_mouseover(this,
> > > >> event);" onmouseout="javascript:igmenu_mouseout(this, event);"
> > > >> onmousedown="javascript:igmenu_mousedown(this, event);" border="0"
> > > >> cellSpacing="1" cellPadding="2" igLevel="0" submenu="1">
> > > >> 
> > > >> 
> > > >>  > > >> id="uwmMainMenu_1" class="IGMenuItem"
> > > >> onfocus="igmenu_kbFocus(this,event);"
> > > >> onkeyup="igmenu_kbNav(this,event);" align="center" igTop="1"
> > > >> igChildId="uwmMainMenu_1M" igHov="IGMenuItemHover" igTag="1"
> > > >> igClass="IGMenuItem">
> > > >> Searches
> > > >> 
> > > >>  > > >> id="uwmMainMenu_2" class="IGMenuItem"
> > > >> onfocus="igmenu_kbFocus(this,event);"
> > > >> onkeyup="i

[wtr-general] Re: How to access element in a table ?

2010-07-27 Thread Tiffany Fodor
Hi!

The Watir Cheat Sheet (http://wiki.openqa.org/display/WTR/Cheat+Sheet)
has an example of working with table elements:

td = browser.table(:name, 'recent_records')[2][1]

td is now the cell at row 2, column 1 of your table.

There's more information on the Table class in the Watir API
reference:

http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Table.html

Hope this helps!

-Tiffany


On Jul 27, 2:04 pm, Chan Nguyen  wrote:
> Hi Basim,
>
> Thanks a lot for your quick response. I just found out that element is
> actually a table.
> I accessed to a particular table like this :
> my_table = ie.table( :id, "uwmMainMenu_MainM" )
>
> Next, I need to access the each element of the first row of this table, but
> I got stuck at this point.
> Could you give me a minimal example to access "table"? Further, I don't know
> how to "click" an option in this list?
>
> http://i235.photobucket.com/albums/ee62/rox_rook/Ex-1.gif
>
> On Tue, Jul 27, 2010 at 12:59 PM, Basim Baassiri  wrote:
> > Hi Chan
>
> > You can try and use firebug to identify element
> >http://getfirebug.com/downloads
>
> >  Basim
>
> > On Tue, Jul 27, 2010 at 3:17 PM, Chan Nguyen  wrote:
>
> >>  down vote  favorite
>
> >> Hi everyone,
>
> >> I'm current writing a test script for our MLS( Multiple Listing
> >> System ) systems. The website is mainly written in C# .NET. Here is
> >> the screenshot that I got:
> >>http://i235.photobucket.com/albums/ee62/rox_rook/Ex-1.gif
>
> >> And this is the HTML source:
> >>  >> equiv="Content-Type" content="text/html; charset=utf-8">
>
> >>  >> sizset="1"> >> action="Menu.aspx?hidMLS=SDNA" sizcache="33" sizset="1"> >> id="divControlPanel" class="ControlPanel" sizcache="33"
> >> sizset="1"> >> sizset="1"> >> sizset="1">
>
> >>  >> id="uwmMainMenu_MainM" onmouseup="javascript:igmenu_mouseup(this,
> >> event);" onselectstart="javascript:igmenu_selectStart();"
> >> class="WebMenu" onmouseover="javascript:igmenu_mouseover(this,
> >> event);" onmouseout="javascript:igmenu_mouseout(this, event);"
> >> onmousedown="javascript:igmenu_mousedown(this, event);" border="0"
> >> cellSpacing="1" cellPadding="2" igLevel="0" submenu="1">
> >> 
> >> 
> >>  >> id="uwmMainMenu_1" class="IGMenuItem"
> >> onfocus="igmenu_kbFocus(this,event);"
> >> onkeyup="igmenu_kbNav(this,event);" align="center" igTop="1"
> >> igChildId="uwmMainMenu_1M" igHov="IGMenuItemHover" igTag="1"
> >> igClass="IGMenuItem">
> >> Searches
> >> 
> >>  >> id="uwmMainMenu_2" class="IGMenuItem"
> >> onfocus="igmenu_kbFocus(this,event);"
> >> onkeyup="igmenu_kbNav(this,event);" align="center" igTop="1"
> >> igChildId="uwmMainMenu_2M" igHov="IGMenuItemHover" igTag="2"
> >> igClass="IGMenuItem">
> >> Listings
> >> 
> >>  >> id="uwmMainMenu_3" class="IGMenuItem"
> >> onfocus="igmenu_kbFocus(this,event);"
> >> onkeyup="igmenu_kbNav(this,event);" align="center" igTop="1"
> >> igHov="IGMenuItemHover" igTag="26" igFrame="_Script"
> >> igUrl="menuOneLevelItemClick('http://realist2.firstamres.com/
> >> propertylink?
>
> >> UserID=rapstaff&AgentLastName=Staff&AgentFirstName=Rapattoni&CustomerGroupName=Sedona
> >> Verde Valley&UserPW=sedona','_Realist')" igClass="IGMenuItem">
> >> Tax
> >> 
> >>  >> id="uwmMainMenu_4" class="IGMenuItem"
> >> onfocus="igmenu_kbFocus(this,event);"
> >> onkeyup="igmenu_kbNav(this,event);" align="center" igTop="1"
> >> igHov="IGMenuItemHover" igTag="3" igFrame="_Script"
> >> igUrl="Cart_OnClick()" igClass="IGMenuItem">
> >> Cart
> >> 
> >>  >> id="uwmMainMenu_5" class="IGMenuItem"
> >> onfocus="igmenu_kbFocus(this,event);"
> >> onkeyup="igmenu_kbNav(this,event);" align="center" igTop="1"
> >> igChildId="uwmMainMenu_5M" igHov="IGMenuItemHover" igTag="4"
> >> igClass="IGMenuItem">
> >> Contacts
> >> 
> >>  >> id="uwmMainMenu_6" class="IGMenuItem"
> >> onfocus="igmenu_kbFocus(this,event);"
> >> onkeyup="igmenu_kbNav(this,event);" align="center" igTop="1"
> >> igChildId="uwmMainMenu_6M" igHov="IGMenuItemHover" igTag="5"
> >> igClass="IGMenuItem">
> >> Links
> >> 
> >>  >> id="uwmMainMenu_7" class="IGMenuItem"
> >> onfocus="igmenu_kbFocus(this,event);"
> >> onkeyup="igmenu_kbNav(this,event);" align="center" igTop="1"
> >> igChildId="uwmMainMenu_7M" igHov="IGMenuItemHover" igTag="6"
> >> igClass="IGMenuItem">
> >> Admin
> >> 
> >>  >> id="uwmMainMenu_8" class="IGMenuItem"
> >> onfocus="igmenu_kbFocus(this,event);"
> >> onkeyup="igmenu_kbNav(this,event);" align="center" igTop="1"
> >> igChildId="uwmMainMenu_8M" igHov="IGMenuItemHover" igTag="7"
> >> igClass="IGMenuItem">
> >> Help
> >> 
> >> 
> >> 
> >> 
>
> >> 
>
> >> I tried to use TestWise Recorder on Firefox to see what actual element
> >> that I currently access, but FF does not recognize it. :(
>
> >> Anyone could give me a hint where I missed ?
>
> >> Thanks,
>
> >> --
> >> Before posting, please readhttp://watir.com/support. In short: search
> >> before you ask, be nice.
>
> >> You received this message because you are subscribed to
> >>http://groups.google.com/group

[wtr-general] Re: new page has no focus

2010-07-26 Thread Tiffany Fodor
Hi Kim!

The closest thing I've come across is when a page isn't finished
loading and IE or Firefox times out.  It doesn't really sound like
that's your problem though.

Have you tried using AutoIt send_keys to send a tab to put the focus
on an element?

$ie.send_keys("{TAB}")

Hope this helps!

-Tiffany

On Jul 26, 1:29 pm, KimBrown  wrote:
> There are a couple of spots in my application where nothing happens. I
> think it's because a page with no defaulted active field (ie.,
> blinking cursor). Can I get watir to "activate" these pages?
>
> I've searched in the archives and found a focus command:
> $ie.text_field(:id, 'name'').focus()  but it doesn't do the trick.
> Only with me clicking on the webpage, will this command and any others
> that I try in my script continue to run. Until I click on the page
> nothing happens.
>
> Has anyone run into this?
>
> thanks, Kim

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Watir::Exception::UnknownFrameException: Unable to locate a frame with index 4

2010-07-26 Thread Tiffany Fodor
Hi Sats!

Most of us in the Watir community don't advocate the use of test
automation recorders and therefore can't really provide support for
them.

The error message you shared indicates that the frame you're
attempting to access doesn't exist on the page you're testing.  I
would recommend using an irb session to verify that the frame actually
exists.

I can't speak to the IE error you're seeing since you didn't include
the text of it, but again, I would recommend stepping through the
tests in question in an irb session to work out the kinks.

Hope this helps!

-Tiffany

On Jul 26, 5:03 am, Sats  wrote:
> Dear Watir Users,
>
> I am new to Watir...
> I was recording a test for my web application entering username and
> password and submit...
> I recorded the test using the Webmetrics RIA Script recorder...
> When I try to playback the recorded script it throwing an error at the
> line where I click the submit button after entering the login
> details...
> Watir::Exception::UnknownFrameException: Unable to locate a frame with
> index 4
>
> I really don't understand why its throwing an error...
> Also, While recording the test script, when i click submit button, it
> throwed an error saying Internet Explorer Script error...
>
> I guess both has some kind of relation...
>
> Would really appreciate if someone could help me with this...
>
> Many Thanks
> Sats

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Getting error (JsshSocket::JSReferenceError)

2010-07-23 Thread Tiffany Fodor
Hi!

I think Firefox 3.6.7 is a new build.  Have you installed the new jssh
extension for it?

Hope this helps!

-Tiffany

On Jul 23, 5:54 am, Chethan  wrote:
> Hi Every one,
>
> I am trying to run my script in firefox, I am getting following error
>
> :/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> jssh_socket.rb:12:in `js_eval':  Components is not defined
> (JsshSocket::JSReferenceError)
>         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> firefox.rb:195:in `goto'
>         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> firefox.rb:164:in `start'
>         from C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.5/lib/watir/
> browser.rb:71:in `start'
>
> Pls help me to solve this, I am executing this with window-XP-
> Firefox3.6.7
>
> Thanks,
> Chethan

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Check out the Watir Stack Exchange site!

2010-07-22 Thread Tiffany Fodor
Hi all!

I'm replying to this again to move it back to the front page at Watir
General.

Give Zeljko's latest podcast a listen to learn about Stack Exchange
and then go sign up and follow the Watir site.

We only need 4 more followers to move the Watir Stack Exchange site
from the Definition phase to the Commitment phase.

If you've ever wondered how to help out or get more involved with the
Watir community, this is a good start.

I know, I sound like an NPR (that's National Public Radio, for those
of you not in the US) host during a pledge drive...  But the only way
to stop me is to help out with the Stack Exchange site.  :)

Watir Stack Exchange Site - http://area51.stackexchange.com/proposals/6738/watir
Watir Podcast - www.watirpodcast.com

See you there!

-Tiffany

On Jul 12, 12:32 pm, Tiffany Fodor  wrote:
> Zeljko has posted the new podcast.
>
> http://watirpodcast.com/
>
> Give it a listen and then head over to the Stack Exchange site and
> follow it.  We only need 13 more followers to move on to the next
> phase.
>
> See you there!
>
> -Tiffany
>
> On Jul 6, 10:44 am, Tiffany Fodor  wrote:
>
> > Hi all!
>
> > Zeljko has done a great job in getting the Watir Stack Exchange site
> > underway and a lot of folks from the Watir community have helped to
> > build it up.  We only need 17 more followers to move from the
> > Definition phase to the Commitment phase.
>
> > Check out the site and follow it here:
>
> >http://area51.stackexchange.com/proposals/6738/watir
>
> > and then watch for the new Watir Podcast where Zeljko and Felipe talk
> > about the benefits of Stack Exchange.
>
> > -Tiffany

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: link click no updates

2010-07-20 Thread Tiffany Fodor
Have you tried to use the link/span text - looks like it's 'Target
Provisioning'?

ie.link(:text, 'Target Provisioning').click
or
ie.span(:text, 'Target Provisioning').click

-Tiffany

On Jul 20, 3:24 pm, roland panganiban 
wrote:
> also tried that command and doesn't worked, during the execution there was
> highlighted yellow on the target provisioning link and little flashing on
> the page but the correct page doesn't want to upload.  No error found for
> this command.
>
> On Tue, Jul 20, 2010 at 4:55 PM, Tiffany Fodor  wrote:
> > Hmm...
>
> > Is it possible your link is actually a span?
>
> > ie.span(:id,"navigationTree:systemTargetProvisioningTypeCommand").click
>
> > Have you tried these commands in irb?  Do you get any error messages?
>
> > -Tiffany
>
> > On Jul 20, 2:50 pm, roland panganiban 
> > wrote:
> > > Thank you for the responsed, yes already tried the fire_event command and
> > > still the page can't be loaded.
> > > Roland
>
> >  > On Tue, Jul 20, 2010 at 4:44 PM, Tiffany Fodor 
> > wrote:
> > > > Hi!
>
> > > > Have you tried firing the javascript event associated with the link?
>
> > ie.link(:id,"navigationTree:systemTargetProvisioningTypeCommand").fire_event('onclick')
>
> > > > I'd give this and your link click command a shot in irb to see if it
> > > > works.
>
> > > > Hope this helps!
>
> > > > -Tiffany
>
> > > > On Jul 20, 1:57 pm, lance  wrote:
> > > > > Hi, newbie to watir and have question regarding on clicking the link
> > > > > but page doesn't updated. During the execution I saw highlighted
> > > > > yellow to the title link but the page did not changed.  Saw same
> > > > > problem on the thread but does not really fixed the problem. Below is
> > > > > the command and the source code.
> > > > > Please advise what I am missing.Thanks.
> > > > > Code:
> > > > > Watir::Waiter::wait_until
>
> > {ie.button(:id,"navigationTree:systemTargetProvisioningTypeCommand").exists?}
>
> > ie.link(:id,"navigationTree:systemTargetProvisioningTypeCommand").click
>
> > > > > Source:
> > > > >  > > > > div> > > > > class="acuTreeNode"> > background="/smarttap/javax.faces.resource/
> > > > > images/ice/tree_line_blank.gif.jsf;"> > class="acuTreeLine"> > > > > td>
> > onclick="acu.jsf.tree.setExpandedState('navigationTree:n0:n3:n0:n2','navigationTree:n0:n3:n0:n2:branch');acu.jsf.tree.setNavImage('navigationTree:n0:n3:n0:n2:nav','navigationTree:n0:n3:n0:n2:branch','/
> > > > > smarttap/javax.faces.resource/images/ice/tree_line_bottom.gif.jsf','/
> > > > > smarttap/javax.faces.resource/images/ice/
>
> > tree_line_bottom.gif.jsf');acu.jsf.tree.setIconImage('navigationTree:n0:n3:n0:n2:icon','navigationTree:n0:n3:n0:n2:branch','/
> > > > > smarttap/javax.faces.resource/images/ice/tree_document.gif.jsf','/
> > > > > smarttap/javax.faces.resource/images/ice/
> > > > > tree_document.gif.jsf');"> > > > > src="/smarttap/javax.faces.resource/images/ice/
> > > > > tree_line_bottom.gif.jsf" alt="" class="acuTreeIcon" /> > > > > id="navigationTree:n0:n3:n0:n2:icon" src="/smarttap/
> > > > > javax.faces.resource/images/ice/tree_document.gif.jsf" alt=""
> > > > > class="acuTreeIcon" /> > > > > id="navigationTree:n0:n3:n0:n2:content"
>
> > onmousedown="acu.jsf.tree.setSelectedNode('navigationTree:n0:n3:n0:n2','navigationTree:selectedNode');"
>
> > onkeydown="acu.jsf.tree.setSelectedNode('navigationTree:n0:n3:n0:n2','navigationTree:selectedNode');"
> > > > > class="acuTreeNodeContent"> > > > > id="navigationTree:systemTargetProvisioningTypeCommand" href="#"
> > > > > title="Target Provisioning"
> > > > > onclick="mojarra.jsfcljs(document.getElementById('leftMenuForm'),
>
> > {'navigationTree:systemTargetProvisioningTypeCommand':'navigationTree:systemTargetProvisioningTypeCommand'},'');return
> > > > > false" class="leftMenuLink">Target Provisioning
>
> > > > --
> > > > Before posting, please readhttp://watir.com/support. In short: search
> > > > before you ask, be nice.
>
> > > > You received this message because you are subscribed to
> > > >http://groups.google.com/group/watir-general
> > > > To post: watir-general@googlegroups.com
> > > > To unsubscribe: 
> > > > watir-general+unsubscr...@googlegroups.com
> > 
>
> > --
> >  Before posting, please readhttp://watir.com/support. In short: search
> > before you ask, be nice.
>
> > You received this message because you are subscribed to
> >http://groups.google.com/group/watir-general
> > To post: watir-general@googlegroups.com
> > To unsubscribe: 
> > watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: link click no updates

2010-07-20 Thread Tiffany Fodor
Hmm...

Is it possible your link is actually a span?

 
ie.span(:id,"navigationTree:systemTargetProvisioningTypeCommand").click

Have you tried these commands in irb?  Do you get any error messages?

-Tiffany

On Jul 20, 2:50 pm, roland panganiban 
wrote:
> Thank you for the responsed, yes already tried the fire_event command and
> still the page can't be loaded.
> Roland
>
> On Tue, Jul 20, 2010 at 4:44 PM, Tiffany Fodor  wrote:
> > Hi!
>
> > Have you tried firing the javascript event associated with the link?
>
> > ie.link(:id,"navigationTree:systemTargetProvisioningTypeCommand").fire_event('onclick')
>
> > I'd give this and your link click command a shot in irb to see if it
> > works.
>
> > Hope this helps!
>
> > -Tiffany
>
> > On Jul 20, 1:57 pm, lance  wrote:
> > > Hi, newbie to watir and have question regarding on clicking the link
> > > but page doesn't updated. During the execution I saw highlighted
> > > yellow to the title link but the page did not changed.  Saw same
> > > problem on the thread but does not really fixed the problem. Below is
> > > the command and the source code.
> > > Please advise what I am missing.Thanks.
> > > Code:
> > > Watir::Waiter::wait_until
>
> > {ie.button(:id,"navigationTree:systemTargetProvisioningTypeCommand").exists?}
>
> > > ie.link(:id,"navigationTree:systemTargetProvisioningTypeCommand").click
>
> > > Source:
> > >  > > div> > > class="acuTreeNode"> > > td>
> > onclick="acu.jsf.tree.setExpandedState('navigationTree:n0:n3:n0:n2','navigationTree:n0:n3:n0:n2:branch');acu.jsf.tree.setNavImage('navigationTree:n0:n3:n0:n2:nav','navigationTree:n0:n3:n0:n2:branch','/
> > > smarttap/javax.faces.resource/images/ice/tree_line_bottom.gif.jsf','/
> > > smarttap/javax.faces.resource/images/ice/
>
> > tree_line_bottom.gif.jsf');acu.jsf.tree.setIconImage('navigationTree:n0:n3:n0:n2:icon','navigationTree:n0:n3:n0:n2:branch','/
> > > smarttap/javax.faces.resource/images/ice/tree_document.gif.jsf','/
> > > smarttap/javax.faces.resource/images/ice/
> > > tree_document.gif.jsf');"> > > src="/smarttap/javax.faces.resource/images/ice/
> > > tree_line_bottom.gif.jsf" alt="" class="acuTreeIcon" /> > > id="navigationTree:n0:n3:n0:n2:icon" src="/smarttap/
> > > javax.faces.resource/images/ice/tree_document.gif.jsf" alt=""
> > > class="acuTreeIcon" /> > > id="navigationTree:n0:n3:n0:n2:content"
>
> > onmousedown="acu.jsf.tree.setSelectedNode('navigationTree:n0:n3:n0:n2','navigationTree:selectedNode');"
>
> > onkeydown="acu.jsf.tree.setSelectedNode('navigationTree:n0:n3:n0:n2','navigationTree:selectedNode');"
> > > class="acuTreeNodeContent"> > > id="navigationTree:systemTargetProvisioningTypeCommand" href="#"
> > > title="Target Provisioning"
> > > onclick="mojarra.jsfcljs(document.getElementById('leftMenuForm'),
>
> > {'navigationTree:systemTargetProvisioningTypeCommand':'navigationTree:systemTargetProvisioningTypeCommand'},'');return
> > > false" class="leftMenuLink">Target Provisioning
>
> > --
> > Before posting, please readhttp://watir.com/support. In short: search
> > before you ask, be nice.
>
> > You received this message because you are subscribed to
> >http://groups.google.com/group/watir-general
> > To post: watir-general@googlegroups.com
> > To unsubscribe: 
> > watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: link click no updates

2010-07-20 Thread Tiffany Fodor
Hi!

Have you tried firing the javascript event associated with the link?

 
ie.link(:id,"navigationTree:systemTargetProvisioningTypeCommand").fire_event('onclick')

I'd give this and your link click command a shot in irb to see if it
works.

Hope this helps!

-Tiffany

On Jul 20, 1:57 pm, lance  wrote:
> Hi, newbie to watir and have question regarding on clicking the link
> but page doesn't updated. During the execution I saw highlighted
> yellow to the title link but the page did not changed.  Saw same
> problem on the thread but does not really fixed the problem. Below is
> the command and the source code.
> Please advise what I am missing.Thanks.
> Code:
> Watir::Waiter::wait_until
> {ie.button(:id,"navigationTree:systemTargetProvisioningTypeCommand").exists?}
>
> ie.link(:id,"navigationTree:systemTargetProvisioningTypeCommand").click
>
> Source:
>  div> class="acuTreeNode"> td> onclick="acu.jsf.tree.setExpandedState('navigationTree:n0:n3:n0:n2','navigationTree:n0:n3:n0:n2:branch');acu.jsf.tree.setNavImage('navigationTree:n0:n3:n0:n2:nav','navigationTree:n0:n3:n0:n2:branch','/
> smarttap/javax.faces.resource/images/ice/tree_line_bottom.gif.jsf','/
> smarttap/javax.faces.resource/images/ice/
> tree_line_bottom.gif.jsf');acu.jsf.tree.setIconImage('navigationTree:n0:n3:n0:n2:icon','navigationTree:n0:n3:n0:n2:branch','/
> smarttap/javax.faces.resource/images/ice/tree_document.gif.jsf','/
> smarttap/javax.faces.resource/images/ice/
> tree_document.gif.jsf');"> src="/smarttap/javax.faces.resource/images/ice/
> tree_line_bottom.gif.jsf" alt="" class="acuTreeIcon" /> id="navigationTree:n0:n3:n0:n2:icon" src="/smarttap/
> javax.faces.resource/images/ice/tree_document.gif.jsf" alt=""
> class="acuTreeIcon" /> id="navigationTree:n0:n3:n0:n2:content"
> onmousedown="acu.jsf.tree.setSelectedNode('navigationTree:n0:n3:n0:n2','navigationTree:selectedNode');"
> onkeydown="acu.jsf.tree.setSelectedNode('navigationTree:n0:n3:n0:n2','navigationTree:selectedNode');"
> class="acuTreeNodeContent"> id="navigationTree:systemTargetProvisioningTypeCommand" href="#"
> title="Target Provisioning"
> onclick="mojarra.jsfcljs(document.getElementById('leftMenuForm'),
> {'navigationTree:systemTargetProvisioningTypeCommand':'navigationTree:systemTargetProvisioningTypeCommand'},'');return
> false" class="leftMenuLink">Target Provisioning

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Find whether a tree has nodes under it

2010-07-20 Thread Tiffany Fodor
Hi Ashok!

It's difficult to help with a solution with none of your code samples
or example html for the element you're trying to work with.

As a guess, I'd check to see if the plus sign image exists before
performing an action on the element next to it.  You also might be
able to use the :after? method to access the element that appears
after the plus sign.

Hope this helps!

-Tiffany

On Jul 19, 10:33 pm, Ashok Prabhu  wrote:
> I have a web application which has a tree structure. I m using Watir
> to automate the application. Sometimes the test case fails where the
> tree group is empty (no nodes under it). Hence there is no plus sign
> to its left. However the application expects it to have nodes and
> fails. How do I find out whether the tree group has nodes under it and
> handle it accordingly.
>
> Thanks,
> ~Ashok.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: cant get an element

2010-07-15 Thread Tiffany Fodor
Hi!

Have you tried the following?

my_text = browser.span(:class, 'wpFieldViewContent').text

my_text = browser.span(:id, /dnn_ctr353_Main/).text

Hope this helps!

-Tiffany


On Jul 15, 3:18 am, ryanthescot  wrote:
>  id="dnn_ctr353_Main_ctl00_ctl00_ctl00_ctl07_Field_048b9dfa-
> bc64-42e4-8bd5-b45385e5f45b_view_value">
> Bishop
> 
>
> I am trying to get the value 'Bishop' from this HTML to use in an if
> statement, but I cant find a way of getting the element.
>
> Can someone advise how i might do so?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Watir on Windows, how is it done anymore?

2010-07-12 Thread Tiffany Fodor
Hey Zeljko - this sounds like a great subject for a podcast.  :)

On Jul 12, 2:00 pm, Ethan  wrote:
> It's compatible with IE on windows, and Firefox on basically any operating
> system that runs both firefox and ruby. More info 
> at:http://wiki.github.com/vapir/vapir/versions
>
> On Mon, Jul 12, 2010 at 15:27, Nathan Lane  wrote:
> > Thank you Ethan. Is Vapir compatible with as many browsers as Watir on as
> > many OSs?
>
> > On Mon, Jul 12, 2010 at 1:22 PM, Ethan  wrote:
>
> >> Watir has been locked to a very old version of ruby for a long time.
> >> Vapir , an updated fork of watir, runs on any recent
> >> version of ruby.
>
> >> On Mon, Jul 12, 2010 at 15:18, Željko Filipin <
> >> zeljko.fili...@wa-research.ch> wrote:
>
> >>> On Monday, July 12, 2010, Nathan Lane  wrote:
> >>> >         from (irb):9        from C:/Ruby191/bin/irb:12:in `'
>
> >>> The last time I have tried, watir did not work with ruby 1.9. Try 1.8.
>
> >>> Željko
>
> >>> --
> >>> Before posting, please readhttp://watir.com/support. In short: search
> >>> before you ask, be nice.
>
> >>> You received this message because you are subscribed to
> >>>http://groups.google.com/group/watir-general
> >>> To post: watir-general@googlegroups.com
> >>> To unsubscribe: 
> >>> watir-general+unsubscr...@googlegroups.com
>
> >>  --
> >> Before posting, please readhttp://watir.com/support. In short: search
> >> before you ask, be nice.
>
> >> You received this message because you are subscribed to
> >>http://groups.google.com/group/watir-general
> >> To post: watir-general@googlegroups.com
> >> To unsubscribe: 
> >> watir-general+unsubscr...@googlegroups.com
>
> > --
> > Nathan Lane
> > Blog,http://blog.nathandelane.com
>
> > --
> > Before posting, please readhttp://watir.com/support. In short: search
> > before you ask, be nice.
>
> > You received this message because you are subscribed to
> >http://groups.google.com/group/watir-general
> > To post: watir-general@googlegroups.com
> > To unsubscribe: 
> > watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Watir on Windows, how is it done anymore?

2010-07-12 Thread Tiffany Fodor
Hey Nathan!

Have you checked watir.com?  Here's the installation page:

http://watir.com/installation/

Hope this helps!

-Tiffany

On Jul 12, 12:52 pm, Nathan Lane  wrote:
> Any thoughts? The examples on OpnQA seem to be broken, and I haven't kept
> up. How do I get going again?
>
> --
> Nathan Lane
> Blog,http://blog.nathandelane.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Check out the Watir Stack Exchange site!

2010-07-12 Thread Tiffany Fodor
Zeljko has posted the new podcast.

http://watirpodcast.com/

Give it a listen and then head over to the Stack Exchange site and
follow it.  We only need 13 more followers to move on to the next
phase.

See you there!

-Tiffany

On Jul 6, 10:44 am, Tiffany Fodor  wrote:
> Hi all!
>
> Zeljko has done a great job in getting the Watir Stack Exchange site
> underway and a lot of folks from the Watir community have helped to
> build it up.  We only need 17 more followers to move from the
> Definition phase to the Commitment phase.
>
> Check out the site and follow it here:
>
> http://area51.stackexchange.com/proposals/6738/watir
>
> and then watch for the new Watir Podcast where Zeljko and Felipe talk
> about the benefits of Stack Exchange.
>
> -Tiffany

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Click image that is buried in a tag

2010-07-09 Thread Tiffany Fodor
Hi!

Can you click on the span?

ff.span(:class, 'PageRight').click

Hope this helps!

-Tiffany

On Jul 9, 1:20 am, skyski  wrote:
> I am trying to figure out how to click a AJAX page to move to next
> page.
>
> Below is the HTML for definition
>
>  src="/CUSTOM/Images/Common/blank.gif">
>
> I do see some javascript for the actual meat
>
> function changePage (obj, dir){
>  area = $(obj).parent('div').attr('area');
>  loadArea (area,dir,0,0);
>
> }
>
>  $(".PageRight").click(function(){changePage($(this),
> 1);}).hover(function(){$(this).addClass('PageRight_HVR');},function(){$
> (this).removeClass('PageRight_HVR');});
>
>  ff.image(:src, /blank.gif/).click  does not do anything
>
>  ff.image(:src, /blank.gif/).fire_event("onClick")  does nothing as
> well...
>
> What am I missing? Is there a better way?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Mapping Excelsheet columns using ruby

2010-07-08 Thread Tiffany Fodor
Hi Chandrika!

I've found a lot of great information on David Mullet's "Ruby on
Windows" blog.

Here's a good post to start with:

http://rubyonwindows.blogspot.com/2007/04/automating-excel-with-ruby-rows-columns.html

Hope this helps!

-Tiffany

On Jul 8, 12:31 am, Chandu80  wrote:
> Hello All,
> I have written a script in which I am taking in values from a
> spreadsheet and inputting them in to fields on a webpage.
> The values are being taken from a column (say column O) of the
> spreadsheet.
> Alongwith this I also want to gather the values corresponding to
> column G of the spreadsheet.
> Is there any map function available in ruby to map columns?
> say for eg G2 <--->O2
>                G3 <---> O3 and so on.
> This is just like corresponding to data in O2 column what is the data
> in G2?
> Please let me know if any command is available for the same.
>
> Thanks in Advance.
>
> Regards
> Chandrika

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Check out the Watir Stack Exchange site!

2010-07-06 Thread Tiffany Fodor
Hi all!

Zeljko has done a great job in getting the Watir Stack Exchange site
underway and a lot of folks from the Watir community have helped to
build it up.  We only need 17 more followers to move from the
Definition phase to the Commitment phase.

Check out the site and follow it here:

http://area51.stackexchange.com/proposals/6738/watir

and then watch for the new Watir Podcast where Zeljko and Felipe talk
about the benefits of Stack Exchange.

-Tiffany

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Unable to Click Submit button

2010-05-10 Thread Tiffany Fodor
Hi Vishal!

The error message you're getting suggests that Watir can't find the
button with id 'showSearchCriteriaButton'.  Have you verified that
your browser is on the page you expect and that you get the same error
when you attempt to perform the action in an irb session?

Sometimes elements that appear as buttons are actually links.  Have
you tried the following?

$ie.link(:text, 'Show Search Criteria').click

Hope this helps!

-Tiffany



On May 10, 4:55 am, Vishal  wrote:
> My program it unable to click on Submit button. Below is the Code
>
> My code :
>  def Click_Show_Criteria
>    $ie.button(:id,'showSearchCriteriaButton').click
>  end
>
> HTML:
>
>  class='action_button_area'> id='hideSearchCriteriaButton' onclick='hideSearchCriteria()'>Hide
> Search Criteria onclick='showSearchCriteria()'
> onmouseover='showFriendlySearchCriteriaText(this)'
> style='display:none'>Show Search Criteria  NOWRAP> style='display:none;color:black' href='#' onclick='popSearch();return
> false;'><Group By:  onchange='handleGroupBy(this);'>No
> GroupingStatus TABLE>
>
> I am getting following error
>
> d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
> `assert_ex
> ists': Unable to locate element, using :id,
> "showSearchCriteriaButton" (Watir::E
> xception::UnknownObjectException)
>
> --
> Before posting, please readhttp://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed 
> tohttp://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Javascript, table and row

2010-04-29 Thread Tiffany Fodor
Hi Damien!

Rows in a table typically contain elements that you click on rather
than the clicking on the row itself.  I see you're firing the
javascript event, but you're not actually calling the click method on
any element.  Have you tried to click on a link or span of text
first?  Here's an example with your code, but you should use a dev
tool to determine the type of the element the text you want to click
on.

if cell.text =~ /BE - SO - Infrastructure Management BE/
  puts t[i].text
  cell.link(:text, /BE - SO - Infrastructure Management BE/).click
  t[i].fire_event("OnClick")
end

Hope this helps!

-Tiffany

On Apr 29, 9:39 am, Damien  wrote:
> Hi,
>
> I try to automate some tasks with Watir but I have a problem with a
> functionnal scenario. How to click on a row in a table. The row is
> flashing in yellow color, but no click event
>
> I have try this without success :
>
> popup.frame("autoCompleteDialogIF").frame("availFrame").tables.each do
> |t|
>   for i in 1..t.row_count
>     t[i].each do |cell|
>                 if cell.text =~ /BE - SO - Infrastructure Management BE/
>                         puts t[i].text
>                         t[i].fire_event("OnClick")
>                 end
>         end
>   end
> end
>
> I must find a solution to send this event in order to run the
> javascript command :
> onclick=javascript:parent.MainSelectControl.selectRow()
>
> Any idea ?
>
> Here is a sample html code :
>
>  width="100%" border=0>
>         
>                 
>                          colSpan=2>Click a value to select
>                 
>                 
>                          vAlign=top
> noWrap>Resource Pool Name 
>                          vAlign=top
> noWrap>Pool Manager 
>                 
>                 
>                          
>                 
>         
>         
>                  onmouseover=javascript:parent.MainSelectControl.highlightRow(this);
> onclick=javascript:parent.MainSelectControl.selectRow();
> onmouseout=javascript:parent.MainSelectControl.unHighlightRow();>
>                         AUS - Mainframe and Database 
> Support  TD>
>                         Admin User 
>                 
>                  onmouseover=javascript:parent.MainSelectControl.highlightRow(this);
> onclick=javascript:parent.MainSelectControl.selectRow();
> onmouseout=javascript:parent.MainSelectControl.unHighlightRow();>
>                         BE - SO - Infrastructure 
> Management
> BE 
>                         Alain Ponsaers 
>                 
>                  onmouseover=javascript:parent.MainSelectControl.highlightRow(this);
> onclick=javascript:parent.MainSelectControl.selectRow();
> onmouseout=javascript:parent.MainSelectControl.unHighlightRow();>
>                         BE - TS - Front-End 
> Applications BE  TD>
>                         Pieter Notelaers 
>                 
>         
> 
>
> --
> Before posting, please readhttp://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed 
> tohttp://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Running Watir in silent mode

2010-04-22 Thread Tiffany Fodor
Hi!

If you're running your test on Windows, you can launch your framework
in background mode with the -b switch:

ruby my_watir_framework.rb -b

However, it sounds like you may just be using Windows to launch the
tests on a Linux machine, in this case, try using the browser.visible
method after you create your browser instance:

browser.visible = false

Hope this helps!

-Tiffany

On Apr 22, 11:37 am, gmile  wrote:
> I wonder if it's possible to run Watir in silent mode, i.e. not
> running the browser. I'm also interested whether it's possible to do
> the same in FireWatir.
>
> The point is that I want to run my Watir script remotely, and I don't
> want to fire up a browser instance there. I've googled for a while but
> didn't get the answer. Any suggestions? Is it possible?
>
> If it's important — I'm running Windows, but remote machine is going
> to be Linux. Thanks in advance.
>
> PS. Plz notice me if it's impossible to do so that I could start
> looking for another solution.
>
> --
> Before posting, please readhttp://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed 
> tohttp://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com


[wtr-general] Re: getElementsByTagName

2010-04-22 Thread Tiffany Fodor
Hi!

I would suggest troubleshooting your imgs array.  Try doing a puts
imgs after the variable is created to see what is stored in it.  It
looks like the array may actually be empty, or maybe you have a
mismatch with your array index.

Hope this helps!

-Tiffany

On Apr 22, 9:25 am, thestumonkey  wrote:
> I am using getElementsByTagName in order to get a list of images on
> the page, and then checking the alt text against that in an excel
> spreadsheet.
>
> This works, unless there is only 1 img on the page, in which case I
> get the error "undefined local variable or method `i' for # 0x30f9e4>"
> I assume that this is because getElementsByTagName isn't returning an
> array that I can use the "each" method ?
>
> Any ideas how to solve this?
>
> Here is the code:
>
> def checkIMG(browser, record)
>   imgLocation = @site + record['Image Location']
>   altText = record['Alt Text']
>   locationFound = 0
>
>   imgs=
> browser.document.body.parentElement.getElementsByTagName("img")
>
>     imgs.each do |i|
>               if i.src == imgLocation
>                 @html.addtoReport("Location", 'PASS', "A:
> '#{i.src}'E: '#{imgLocation}'")
>                 #puts "  Location correct. Actual '#{i.src}'  expected
> is '#{imgLocation}'"
>                 locationFound = 1
>                 if i.alt == altText
>                 �...@html.addtoreport("Alt Text", 'PASS', "A:
> '#{i.alt}'E: '#{altText}'")
>                  #puts "  AltText correct. Actual '#{i.alt}' expected
> is '#{altText}'"
>                 else
>                 �...@html.addtoreport("Alt Text", 'FAIL', "A:
> '#{i.alt}'E: '#{altText}'")
>                 puts "  IMG ERROR              '#{imgLocation}'"
>                 puts "  ALT ERROR Actual     '#{i.alt}'"
>                 puts "  ALT ERROR Expected '#{altText}'"
>                 end
>               end
>
>     end
>
> --
> Before posting, please readhttp://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed 
> tohttp://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com


[wtr-general] Re: getElementsByTagName

2010-04-22 Thread Tiffany Fodor
Hi!

I would suggest troubleshooting by determining what is in your imgs
variable.  Right after you create imgs, do a puts imgs to find out
what it contains.  It looks like it may actually be empty.  If it's
not empty, you may have a mismatch with your array index.

Hope this helps!

-Tiffany


On Apr 22, 9:25 am, thestumonkey  wrote:
> I am using getElementsByTagName in order to get a list of images on
> the page, and then checking the alt text against that in an excel
> spreadsheet.
>
> This works, unless there is only 1 img on the page, in which case I
> get the error "undefined local variable or method `i' for # 0x30f9e4>"
> I assume that this is because getElementsByTagName isn't returning an
> array that I can use the "each" method ?
>
> Any ideas how to solve this?
>
> Here is the code:
>
> def checkIMG(browser, record)
>   imgLocation = @site + record['Image Location']
>   altText = record['Alt Text']
>   locationFound = 0
>
>   imgs=
> browser.document.body.parentElement.getElementsByTagName("img")
>
>     imgs.each do |i|
>               if i.src == imgLocation
>                 @html.addtoReport("Location", 'PASS', "A:
> '#{i.src}'E: '#{imgLocation}'")
>                 #puts "  Location correct. Actual '#{i.src}'  expected
> is '#{imgLocation}'"
>                 locationFound = 1
>                 if i.alt == altText
>                 �...@html.addtoreport("Alt Text", 'PASS', "A:
> '#{i.alt}'E: '#{altText}'")
>                  #puts "  AltText correct. Actual '#{i.alt}' expected
> is '#{altText}'"
>                 else
>                 �...@html.addtoreport("Alt Text", 'FAIL', "A:
> '#{i.alt}'E: '#{altText}'")
>                 puts "  IMG ERROR              '#{imgLocation}'"
>                 puts "  ALT ERROR Actual     '#{i.alt}'"
>                 puts "  ALT ERROR Expected '#{altText}'"
>                 end
>               end
>
>     end
>
> --
> Before posting, please readhttp://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed 
> tohttp://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com


[wtr-general] Re: Saving Javascript Files

2010-04-14 Thread Tiffany Fodor
Hi!

Watir is a Ruby library that allows users to interact with web
browsers.  There's a good chance that you could accomplish your file
management with Ruby, but that is a question for a Ruby mailing list
(http://www.ruby-lang.org/en/community/mailing-lists/).

Good luck!

-Tiffany

On Apr 12, 10:33 pm, rainkinz  wrote:
> Hi,
>
> Is there an easy way to enumerate and save javascript files (and
> linked css files for that matter) using watir?
>
> Thanks

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using "remove me" as the subject.


[wtr-general] Re: Drop down menu

2010-03-15 Thread Tiffany Fodor
Hi!

You have a typo in your select statement:

$b.select_list(:index, 2).select_list("Test")

should be:

$b.select_list(:index, 2).select("Test")  (although, I think
$b.select_list(:index, 2).set("Test") should work as well)

Have you tried firing your javascript to put focus on the field just
before attempting the select statement?

Hope this helps!

-Tiffany

On Mar 15, 2:43 pm, tester86  wrote:
> I need to click on a drop down.  I have a script that will set the
> focus in the drop down list then when I go to select the value it does
> not select the list. Manually: When I click in the drop down field it
> gets activated then when I click on the drop down arrow it will
> display the list.
>
> Interaction:
>
> When I click in the cell it sets the focus, then I have to click on
> the drop down arrow in order to see the list of options. If I do:
>
> $b.table(:index, 1)[2][6].fire_event("onmousedown")
>
> The above will set the focus in the field that contains the drop down.
> Manually I have click on the drop down in order to see the list
>
> If I do:
>
> $b.select_list(:index, 2).select_list("Test")
>
> It does not click on Test. Is there any way I can click on the drop
> down in order to see the list..

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Answering incomplete requests

2010-03-05 Thread Tiffany Fodor
The Support page on Watir.com and the guidelines page on the wiki look
great!

Thanks guys!

-Tiffany

On Mar 5, 6:28 am, Željko Filipin 
wrote:
> 2010/3/5 Felipe Knorr Kuhn 
>
> > I had to reset password first because I haven't logged in ages. :)
>
> Thanks for editing the page. I will review it the next week when I continue
> working on the support page.
>
> Željko

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Jssh exception message?

2010-03-02 Thread Tiffany Fodor
Hi!

Each time a new version of Firefox is released, the jssh extension has
to be recompiled for it.  You may not have the right version of the
jssh extension for your version of Firefox.  You can get it here:

http://wiki.openqa.org/display/WTR/FireWatir+Installation

Hope this helps!

-Tiffany

On Mar 2, 2:41 pm, hliauw  wrote:
> Anyone knows what this exception message means?
>
> undefined method `messsage' for # this.docShell is null>
>
> it came up on this statement:
> browser = Watir::Browser.new();

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: All calls to Watir::IE.find fail

2010-02-23 Thread Tiffany Fodor
Hi Jim!

I haven't used Hudson, so this is really just a guess, but have you
tried using the attach method instead of the find method?

-Tiffany

On Feb 23, 8:30 pm, Jim  wrote:
> When running Watir through Hudson which launches a nunit console
> executable that runs a nunit test that in turns launches a ruby.exe
> passing a ruby file that has Test::Unit::TestCase test cases will
> always throw errors on the Watir::IE.find calls.  All the find calls
> error with the same OLE and HRESULT codes with the same line numbers
> for the ie-class.rb.  All the other Watir functions perform as normal,
> the only failures are on the Watir::IE.find functions.
>
> Note this configuration works on development machine with everything
> the same except the Hudson piece.   At first I thought this was user
> permissions but I ruled this out by running Hudson under different
> configurations (localsystem, administrator, localsystem interaction
> with desktop, etc...) all fail with the same error.
>
> Example of the error:
>
> WIN32OLERuntimeError: Windows
>
>     OLE error code:80040154 in 
>
>       
>
>     HRESULT error code:0x80020009
>
>       Exception occurred.
>
>     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
> 238:in `method_missing'
>
>     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
> 238:in `each'
>
>     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
> 262:in `_find'
>
>     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
> 256:in `find'

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Need help on dialog access

2010-02-23 Thread Tiffany Fodor
Hi Suresh!

We have a pretty extensive page of popup and modal dialog examples on
the wiki.  Have you tried any of these solutions?

Hope this helps!

-Tiffany

On Feb 23, 2:10 pm, Suresh  wrote:
> Hi,
>
> I am quite new to Ruby/Watir. Currently working to automate an app for
> testing. I have had some success this far, but now I am stuck at a
> particular point. When I click on an item on the page (code below), a
> dialog box pops-up. This dialog box is interactive, as a search is
> done on a user & when the user info is populated, select & click ok to
> come back to the original web-page. (Note: this app works only on IE).
>
> Have the following code on the click on the web-page,
>
>  onmouseover="{tabOver(this);window.status='Clinical Desktop';return
> true;}" onmouseout="tabOut(this);window.status=''"
> onclick="invokeHTBItem('invokeDoc(\'WORKSDOTNET CHWORKS qChart\',
> \'\')', 'D', 'WORKSDOTNET CHWORKS qChart', false,
> true);event.cancelBubble = true" onfocus="this.onmouseover();"
> onblur="this.onmouseout();">
>
> The problem I am facing is after clicking the item on the web-page,
> the dialog pops up. Here is where I cannot proceed further. I cannot
> access any part of the modal dialog via Watir, as the developer tool
> (IE) does not show any reference for this dialog.I am not sure how to
> proceed further from here. Tried searching for answers on the web, but
> unsuccessful so far. So posting it here. Any help is appreciated.
>
> Thanks
>
> which is for a mouse click.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: How to get the output in '.xls' through WATIR

2010-02-22 Thread Tiffany Fodor
So, you're trying to save a screen shot in an Excel spreadsheet?

I don't fully understand what you're trying to do, but I'd start
narrowing down the problem.

Try putting your screen shot in an application that is designed for
that type of data (Word, Paint, etc) and make sure that the data
you're getting from your screen captures is really what you're
expecting.  If it is, then you could start working in Excel to find
out what it is about the data that it's choking on.  If you're getting
garbage data, it's likely that Excel isn't getting the type of data
it's expecting.

-Tiffany

On Feb 22, 12:52 pm, Sooners  wrote:
> Hi Tiffany,
>
> I am sorry about my unclear question. I should re-write my question. I
> need to save the information I am getting from 'Screen-Capture' in to
> '*.xls' format. Currently, I am able to do that using the code poasted
> earlier, but it stores only garbage value. The above post is more
> about saving an document in 'xls' format.
>
> thanks & regards,
>
> Suyog
>
> On Feb 22, 1:25 pm, Tiffany Fodor  wrote:
>
> > Hi!
>
> > I've found a lot of useful information on this site for working with
> > Windows apps using Ruby:
>
> >http://rubyonwindows.blogspot.com/
>
> > Hope this helps!
>
> > -Tiffany
>
> > On Feb 22, 12:09 pm, Sooners  wrote:
>
> > > Hi,
>
> > > I am doing automation for sending an 'xml' query to one of the server
> > > using 'WATIR' and I am getting output in 'xml' format in web browser.
> > > Now, I want to save this output in '.xls' format so that I can compare
> > > this using some macros in another excel sheet.
>
> > > I have tried using watir screen-capture as follows but did not get
> > > success.
>
> > >     require "watir"
> > >     require 'watir/screen_capture'
> > >     include Watir::ScreenCapture
>
> > > # WATIR script to connect to Server
>
> > >       filename = 'ScreenCapturefor100.xls'
> > >       screen_capture(filename , active_window_only=false,
> > > save_as_bmp=false)
>
> > > Please help me this is very urgent.
>
> > > Thanks
>
> > > Sooners

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Question about execute the scripts in background

2010-02-22 Thread Tiffany Fodor
Hmm...

When I responded the first time, I tried the -b switch with my
Test::Unit framework and it worked on my Windows machine.  I don't
have a Mac, so I can't try there.  I found this post where Bret
describes running it as an 'untouched argument', but I don't really
know what that means:

ruby my_watir_framework.rb -- -b

Some people here have done some load testing using Watir, but I don't
know how many sessions you could use.  I imagine it would depend on
your system and environment.  I'd say give it a shot and see how many
you can push.  The group would probably be interested in your results.

-Tiffany

On Feb 22, 3:45 pm, Moises Siles  wrote:
> Tiffany, I ran the script using the -b parameter but I saw the browser
> any idea?
>
> On Mon, Feb 22, 2010 at 3:59 PM, Moises Siles wrote:
>
> > Thanks Tiffany, I will try. One more question I running the scripts in Mac,
> > if I add that command it will support 100 users?
>
> > Thanks
>
> > On Mon, Feb 22, 2010 at 3:42 PM, Tiffany Fodor wrote:
>
> >> Hi Moises!
>
> >> You can use the -b switch to run your tests in background mode:
>
> >> ruby my_watir_framework.rb -b
>
> >> Hope this helps!
>
> >> -Tiffany
>
> >> On Feb 22, 2:12 pm, Moises Siles  wrote:
> >> > Hi all,
>
> >> > I'm newbie in Watir, I want to know if there is a way to execute the
> >> scripts
> >> > in background, I want to execute my script using 100 users but I don't
> >> want
> >> > to have 100 firefox, safari instances.
>
> >> > Thanks in advance.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Watir General" group.
> >> To post to this group, send email to watir-general@googlegroups.com
> >> Before posting, please read the following guidelines:
> >>http://wiki.openqa.org/display/WTR/Support
> >> To unsubscribe from this group, send email to
> >> watir-general+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Question about execute the scripts in background

2010-02-22 Thread Tiffany Fodor
Hi Moises!

You can use the -b switch to run your tests in background mode:

ruby my_watir_framework.rb -b

Hope this helps!

-Tiffany

On Feb 22, 2:12 pm, Moises Siles  wrote:
> Hi all,
>
> I'm newbie in Watir, I want to know if there is a way to execute the scripts
> in background, I want to execute my script using 100 users but I don't want
> to have 100 firefox, safari instances.
>
> Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Error "OLE error code:80070057 in htmlfile"

2010-02-22 Thread Tiffany Fodor
Hi Frank!

You're correct, Watir methods are 1-based instead of 0-based.  There
is a plan to fix this in Watir 2.0.

Hope this helps!

-Tiffany

On Feb 22, 10:20 am, Frank Harper  wrote:
> When the value of the 'index' variable is 0, I'm getting an OLE error with
> the following code
>
>     $ie.table(:id,'job_list')[index].link(:href,/results\/show/).exists?
>
> Does this mean that the [] method in Watir::Table is 1 based rather than 0
> based as normal Ruby arrary are?
>
> If so, I think
> - this should be documented,
> - a clear error message should be given when this occurs
>
> Below is the error message I'm getting
>
> test_1_succeed_failure_symbols(Test_total_success_warning_failure_error_all):
> WIN32OLERuntimeError: item
>     OLE error code:80070057 in htmlfile
>       Invalid argument.
>     HRESULT error code:0x80020009
>       Exception occurred.
>     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/table.rb:159:in
> `method_missing'
>     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/table.rb:159:in
> `_row'
>     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/table.rb:99:in `[]'

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: How to get the output in '.xls' through WATIR

2010-02-22 Thread Tiffany Fodor
Hi!

I've found a lot of useful information on this site for working with
Windows apps using Ruby:

http://rubyonwindows.blogspot.com/

Hope this helps!

-Tiffany

On Feb 22, 12:09 pm, Sooners  wrote:
> Hi,
>
> I am doing automation for sending an 'xml' query to one of the server
> using 'WATIR' and I am getting output in 'xml' format in web browser.
> Now, I want to save this output in '.xls' format so that I can compare
> this using some macros in another excel sheet.
>
> I have tried using watir screen-capture as follows but did not get
> success.
>
>     require "watir"
>     require 'watir/screen_capture'
>     include Watir::ScreenCapture
>
> # WATIR script to connect to Server
>
>       filename = 'ScreenCapturefor100.xls'
>       screen_capture(filename , active_window_only=false,
> save_as_bmp=false)
>
> Please help me this is very urgent.
>
> Thanks
>
> Sooners

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: IRB and Firewatir script

2010-02-18 Thread Tiffany Fodor
Hi!

Are you getting an error message, or is nothing at all happening?

Can you trigger the modal dialog manually in Firefox?  Do you have
javascript disabled in Firefox?

-Tiffany


On Feb 18, 10:06 am, tester86  wrote:
> Hi
>
> In an IRB session when I trigger an onmousedown and onmouseup event on
> a link that generates a modal dialogue box it shows the modal
> dialogue. Then when I copy that code into a test case and execute
> firefox does not generate the modal dialogue.
>
> Code:
>
> $b.span(:class, "value ell").fire_event("onmousedown")
>
> $b.span(:class, "value ell").fire_event("onmouseup")
>
> Result: modal dialogue shown
>
> When this is placed in a test case and executed does not show modal
> dialogueAny clues.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Right click on the web page to click on the option export to excel sheet

2010-02-17 Thread Tiffany Fodor
Hi!

Here's an old thread about right-clicking an element:

http://groups.google.com/group/watir-general/browse_thread/thread/67dda45048bb8744

And the resulting wiki page:

http://wiki.openqa.org/display/WTR/Right+Click+an+Element

Hope this helps!

-Tiffany

On Feb 17, 6:48 am, JOY  wrote:
> HI,
>
>  I want to automate  a scenario using watir where  i want to  download
> the contents of web page into an excel sheet.
>  Am trying out this:
>  1:Right click on the  web page to click on the  option  "export to
> excel sheet"
>  2 : Now  formatting the  contents in the Excel Sheet,
>
>  Can you please help me out in doing this.I work under  watir
> automation. I just want to know how to right to get the  options.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Question About Watir

2010-02-17 Thread Tiffany Fodor
Hi!

Is there a part of the id values that is unique and consistent?  If
so, you could use a regex.  For example if your id is 'field_id_XXX'
where XXX is a number that is auto-generated:

browser.text_field(:id, /field_id/).set('My Text')

Are there other attributes that are available (:name, :class, etc)?

If you know how many of each object exists and their order is
consistent, you could get the id this way:

browser.text_field(:index, 1).attribute_value('id')

Otherwise, maybe you could learn how the ids are generated and try to
build some code to model that.

Hope this helps!

-Tiffany

On Feb 17, 3:00 pm, tester86  wrote:
> Hi
>
> I came across that example before on automation frameworks. I have
> already started to implement a framework. But my question was is there
> any way Watir supports automatically generated ID's?
>
> Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: My blog about Watir and RSpec

2010-02-15 Thread Tiffany Fodor
Hey Jarmo!

I've subscribed to your RSS feed as well.

-Tiffany

On Feb 15, 10:00 am, Željko Filipin 
wrote:
> On Sun, Feb 14, 2010 at 5:29 PM, Jarmo Pertman  wrote:
> > Just wondering, how do you "look forward"? Did you subscribe to the
> > RSS feed or just will revisit the site or how?
>
> Not sure if you asked just Tiffany or all of us, but I subscribe to feed.
>
> Željko

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Having trouble navigating Frames

2010-02-12 Thread Tiffany Fodor
Hi!

If this is a typical frames implementation, you just need to specify
which frame your link is in. You can find out what frames are
available in irb with the show_frames method:

browser.show_frames

I'm having trouble telling from the HTML, but it looks like 'New
Search' is a span.  If that's the case, this should work:

browser.frame(:name, 'TopContent').span(:text, 'New Search').click

Hope this helps!

-Tiffany


On Feb 12, 3:29 pm, RansomEli  wrote:
> I've been reading the previous posts, but can't seem to grasp the
> concept of traversing through frames to click on a link.  I have the
> following HTML and would like to use Watir to click on the 'New
> Search' image button.  I've been trying but can't seem to find the
> link to click on it.
>
> < frameset border="0" framespacing ="0" frameborder="0 " rows="33,*  "
>
>      < frame scrolling ="no" noresize="noresize"
> src="TopContent.asp"   name="TopContent">
>        
>           
>           
>             

[wtr-general] Re: My blog about Watir and RSpec

2010-02-11 Thread Tiffany Fodor
Great blog, Jarmo!

It should definitely be included on the Watir.com list of blogs.
Alister (and maybe Zeljko) can add it.

I'm looking forward to reading more!

-Tiffany

On Feb 11, 2:34 pm, Jarmo Pertman  wrote:
> Hello.
>
> I've been blogging already some time now about Watir and RSpec and
> will continue doing it. I'm not creating new posts often, but I have
> somekind of to-do list on my PC for future topics.
>
> I've been creating some posts which are little bit tied to each other
> - e.g. i started doing something in the older posts and i've been
> modifying existing things to make them better and add more
> functionality - that's why it would be best to start reading from the
> older posts to see the improvements better :) Too bad it's not
> possible to sort the posts by date...
>
> Anyway, just wanted to let you know about my blog and i'm waiting for
> any feedback in here or you should be able to post comments to the
> posts directly also.
>
> Also, what should I do to get my blog listed athttp://watir.com/blogs/
> or is there somekind of freaky requirements which blog should fulfill
> to get into that list?
>
> Oh, and almost forgot - the blog itself is visible 
> athttp://itreallymatters.tumblr.com/
>
> Enjoy!
>
> Jarmo

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: How to retrieve other attributes of the object?

2010-02-11 Thread Tiffany Fodor
Hi!

There is a way to do this using the attribute_value method:

puts $Browser.button(:name => 'bu_0', :value
=>'Logon').attribute_value('class')

Here's a recent discussion:

http://groups.google.com/group/watir-general/browse_thread/thread/76e33d4eaa2319d0

Hope this helps!

-Tiffany

On Feb 11, 7:03 pm, Logic Bomb  wrote:
> Hi,
>
> Is there a command in Watir that I can use to retrieve other
> attributes of the object? See my sample code below (this is just an
> idea and not the correct syntax):
>
> puts $Browser.button(:name => 'bu_0', :value =>
> 'Logon').attribute('class')
>
> Please do not tell me to use IE Developer Toolbar or Firebug to get
> the object properties. I want to retrieve the attributes in Watir
> code.
>
> Thanks,
> Logic Bomb

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: use verify instead of assert

2010-02-11 Thread Tiffany Fodor
Hi Matt!

Since you're just starting, you may want to take some time to consider
what type of framework will work best for you.  Most people use a
Test::Unit or an RSpec framework, or a variation on one of them.  I'm
still using Test::Unit because I like it (I like the syntax and if a
verification fails, the test will continue on its own without having
to add a rescue statement).  Most people, however, have moved to RSpec
and find it more intuitive to work with.

You can find examples of various test frameworks here:

http://wiki.openqa.org/display/WTR/Examples

Hope this helps!

-Tiffany

On Feb 11, 7:29 am, Matt  wrote:
> Thanks!
>
> On Feb 10, 5:23 pm, Paul Rogers  wrote:
>
> > you use @browser.link and not $browser as youve used elsewhere in your
> > testcase
>
> > Paul
>
> > On Wed, Feb 10, 2010 at 2:08 PM, Matt  wrote:
> > > I am receiving the following error:
>
> > >  1) Error:
> > > test_a_order_now(TC_S001):
> > > NoMethodError: undefined method `link' for nil:NilClass
> > >    Story001_set.rb:50:in `test_a_order_now'
>
> > > 
>
> > > ###
>
> > > require 'watir'
> > > require "watir/testcase"
>
> > > class TC_S001 < Watir::TestCase
>
> > >  def test_a_order_now
>
> > >   #variables
> > >   test_site = 'https://www.mysite.com'
>
> > >   #open a browser
> > >   $browser = Watir::Browser.new
>
> > >   puts '## Beginning of test: Order'
> > >   puts '  '
>
> > >   puts 'Step 1: go to the site'
> > >   $browser.goto(test_site)
> > >   puts '  Action: entered ' + test_site + ' in the address bar.'
>
> > >   puts 'Check for Security Warning'
> > >   if $browser.text.include? "Continue to this website (not
> > > recommended)."
> > >      puts 'Security Warning found'
> > >    $browser.link(:text, "Continue to this website (not
> > > recommended).").click
> > >      puts 'Clicked Continue on Security Warning'
> > >    end
>
> > >   verify((@browser.link(:text, "some text").exists?), message="Field
> > > not active.")
> > >   $browser.link(:text, "some text").click
>
> > >   puts '  '
> > >   puts '## End of test: Order Now'
>
> > >  end # end of test_order_now
>
> > > ###
>
> > > On Feb 10, 2:42 pm, Matt  wrote:
> > > > Hi,
>
> > > > I am new to Watir and trying to figure out the best way to go about
> > > > validating my AUT. I started out by using the assert method for text
> > > > checks but do not like that it exits when there is a failure and does
> > > > not execute the following statements. So my questions are:
>
> > > > How is the verify method used?
> > > > Can I check for objects, properties, text, etc with verify? (need to
> > > > check for the existence of objects)
> > > > Which libraries need to be loaded?
>
> > > > I added 'require "watir/testcase" ' as directed in another post and it
> > > > did not work. I was using it like this:
>
> > > > verify($browser.text.include?("Order Now") )
>
> > > > best practices for reporting to test results?
>
> > > > Thanks!
>
> > > > Matt
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Watir General" group.
> > > To post to this group, send email to watir-general@googlegroups.com
> > > Before posting, please read the following guidelines:
> > >http://wiki.openqa.org/display/WTR/Support
> > > To unsubscribe from this group, send email to
> > > watir-general+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Another VERIFY question

2010-02-11 Thread Tiffany Fodor
Hi Matt!

You're on the right track, but verifying text is a bit different.
Give this a try:

verify(($browser.text.include?("Find Offer")), message="Field not
active.")

Hope this helps!

-Tiffany

On Feb 11, 7:46 am, Matt  wrote:
> Hi,
>
> I have another question about the verify method. Can it be used to
> verify text on a page? I tried using it like this:
>
> verify(($browser.text("Find Offer").exists?), message="Field not
> active.")
>
> Received the following error:
>
> ArgumentError: wrong number of arguments (1 for 0)
>
> Thanks!
>
> Matt

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Handle Failures in Watir

2010-02-04 Thread Tiffany Fodor
Hi!

If you know which elements are likely to be missing, you could add a
verification that the element exists, which would trigger a failure if
it's missing and then add a conditional to act on it.  A Test::Unit
example would be:

verify((ie.link(:text, 'My Link').exists?), message='My Link didn't
exist on the page.')
if ie.link(:text, 'My Link').exists?
  ie.link(:text, 'My Link').click
end

If there are many element that are likely to be missing, you may want
to consider adding some good exception handling.  There's a discussion
here:

http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir

Hope this helps!

-Tiffany

On Feb 4, 9:55 am, tester86  wrote:
> Hi
>
> Question for the watir group. When I run my test sometimes it fails if
> it cannot find an element or input field. Is there a way that when
> this occurs it can log that failure and continue running the tests and
> not stop. Is there any Watir commands that I can put in place at
> points in my script to cope with failures?
>
> I am using the ruby logger to output all my result into a text file.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Wonderful Job on the Watir wiki

2010-02-03 Thread Tiffany Fodor
I second that!  The wiki looks awesome Alister!

-Tiffany

On Feb 3, 3:09 pm, "Darryl (gem dandy) Brown"  wrote:
> Great job on the Watir wiki Alister !!
>
> Thanks,
> Darryl

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: please unsubscribe me from watir group

2010-02-02 Thread Tiffany Fodor
Done.

-Tiffany

On Feb 2, 11:04 am, Marina Tolkatcheva  wrote:
>

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Problem with ".click" method

2010-02-01 Thread Tiffany Fodor
Hi Betsy!

Could you please provide more detail on your problem?  Your code, the
html you're testing and any error messages you're getting would help
us troubleshoot.

Thanks!

-Tiffany

On Feb 1, 10:53 pm, Betsy  wrote:
> Hi all,
>
> We seem to be facing some issue with the ".click" method. At times it
> seems to release control of the page before it could load completely.
> Ideally the ".click" method waits for the page to load completely
> before releasing control and so we do not use waits for page load
> explicitly.
>
> Can someone please explain this strange behavior?
>
> Thanks in advance,
> Betsy Joy.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: ".text" method in Watir and FireWatir

2010-02-01 Thread Tiffany Fodor
I just had another couple of thoughts

If you're looking at a select_list, you can get an array of the
selected options like this:

my_selected = browser.select_list(:id, 'my list').selected_options

If there's only one item selected then it will be object at index 0 in
the array:

my_selected[0]

You might also try the .value method to get the value in an element.

Again, without more information it will be tough for us to help you
efficiently.

Thanks!

-Tiffany

On Feb 1, 11:49 pm, Tiffany Fodor  wrote:
> Hi Betsy!
>
> I haven't seen this behavior.  Can you please provide us with some
> code examples and the results that you're getting to help us
> troubleshoot?
>
> Thanks!
>
> -Tiffany
>
> On Feb 1, 10:56 pm, Betsy  wrote:
>
> > The ".text" method returns the complete text of an object including
> > the text of the child objects if any in watir but in FireWatir, the
> > same method behaves differently by returning only the text of the
> > object itself without the text of the Child Objects.
>
> > Please let us know how to handle this difference in behavior.
>
> > Thanks,
> > Betsy Joy.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: ".text" method in Watir and FireWatir

2010-02-01 Thread Tiffany Fodor
Hi Betsy!

I haven't seen this behavior.  Can you please provide us with some
code examples and the results that you're getting to help us
troubleshoot?

Thanks!

-Tiffany

On Feb 1, 10:56 pm, Betsy  wrote:
> The ".text" method returns the complete text of an object including
> the text of the child objects if any in watir but in FireWatir, the
> same method behaves differently by returning only the text of the
> object itself without the text of the Child Objects.
>
> Please let us know how to handle this difference in behavior.
>
> Thanks,
> Betsy Joy.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: How to click this strange link in Firewatir and Safariwatir?

2010-02-01 Thread Tiffany Fodor
Hi Zhong!

I think that different browsers handle non breaking space ( )
differently, so you might want to use a regex to specify the text:

@browser.link(:text, /Demand.*Curves/).click

If this doesn't work, can you please give us the error message you get
to help with troubleshooting?

Hope this helps!

-Tiffany


On Feb 1, 11:19 pm, Yuping Zhong  wrote:
> Dear All,
>
> I want to use the Watir to click a link that looks like a button. Give the
> following detail:
>
> 
>     Demand Curves
> 
>
> I use the following methods,but doesn't works:
>
> @browser.link(:text,"Demand Curves").click
> @browser.link(:text,"Demand Curves").click
>
> -
>
> By the way, @browser.link(:text,"Demand Curves").click works in IE. But
> doesn't works in FF and Safari.
>
> I attach the pictures.
>
> Many thanks!
>
> -Zhong
>
>  link+click.png
> 7KViewDownload
>
>  link.png
> < 1KViewDownload

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: How Ruby Interacts with Powerpoint

2010-02-01 Thread Tiffany Fodor
Hi Arihan!

This is not really a question for this group - you would probably have
more luck with a Ruby group.

I haven't checked in detail, but you might have some luck with the
Ruby on Windows blog:

http://rubyonwindows.blogspot.com/search/label/powerpoint

Hope this helps!

-Tiffany

On Feb 1, 11:08 am, arihan sinha  wrote:
> Hi All,
>
> I was trying to do the ruby script for validation of  a powerpoint.
>
> I've done upto some extent
>
> ppt = WIN32OLE.new('PowerPoint.Application')
> ppt.Visible = true
> ## open the ppt
> doc = ppt.Presentations.Open('c:\sample.ppt')
> ## count the no of slides
> slidecount = doc.Slides.Count
>  ## retrieve the Text present in the slide 1 in shape 1
>  slidetext = doc.slides(1).shapes(1).TextFrame.TextRange.Text
>
> Now I want that there are some hyperlinks in the slide1.
>
> Could anyone pls let me know how I would retrieve those links.
>
> Thanks
> Arihan

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Links Question

2010-01-13 Thread Tiffany Fodor
Yikes!

I missed an ugly typo.  Sorry about that - I should proof read better:

link_index = link_text.index('My link text').index

-should be-

link_index = link_text.index('My link text')

I'm not sure about the :beforeText problem - were you able to make my
www.Google.com example work?

-Tiffany


On Jan 13, 3:31 pm, xguarder  wrote:
> Thanks for the tips.
>
> I tried the index method using the array as you suggested. When I ran
> it, I get an "undefined method 'index'".e
>
> Also, when using the :beforeText or :afterText for the link, I get
> "unable to locate element, using :beforeText..."
>
> Any suggestions on if I'm doing something wrong?
>
> Thanks,
> Ken
>
> On Jan 13, 5:12 pm, Tiffany Fodor  wrote:
>
> > Sorry - I forgot to mention that the array will start at 0, but the
> > link index number in Watir will start at 1.  You could create your
> > array with a placeholder for 0, or add one to the index number you get
> > from the array when you want to access the link in Watir.
>
> > -Tiffany
>
> > On Jan 13, 3:09 pm, Tiffany Fodor  wrote:
>
> > > Hi!
>
> > > You could build an array of all the links and then get the index:
>
> > > link_text = Array.new
>
> > > browser.links.each do |link|
> > >   link_text.push(link.text)
> > > end
>
> > > link_index = link_text.index('My link text').index
>
> > > To click on a link that precedes some text, you can use :beforeText.
> > > On the current Google page, for example:
>
> > > browser.link(:beforeText, 'survivors of the Haiti
> > > earthquake.").click
>
> > > You can also use :afterText, if necessary.
>
> > > Hope this helps!
>
> > > -Tiffany
>
> > > On Jan 13, 2:20 pm, xguarder  wrote:
>
> > > > I was wondering if someone could inform me on how to do the following:
>
> > > > 1. Retrieve link index number of a link. For instance, I know I can
> > > > find the link using ie.link(:text, "LinkText"), and I can also find
> > > > out the index number via irb. However, I want to be able to assign the
> > > > index number of that particular link to a variable on the fly.
>
> > > > 2. Is it possible to click on a link that immediately precedes a
> > > > particular text?
>
> > > > Thanks!
-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Links Question

2010-01-13 Thread Tiffany Fodor
Sorry - I forgot to mention that the array will start at 0, but the
link index number in Watir will start at 1.  You could create your
array with a placeholder for 0, or add one to the index number you get
from the array when you want to access the link in Watir.

-Tiffany

On Jan 13, 3:09 pm, Tiffany Fodor  wrote:
> Hi!
>
> You could build an array of all the links and then get the index:
>
> link_text = Array.new
>
> browser.links.each do |link|
>   link_text.push(link.text)
> end
>
> link_index = link_text.index('My link text').index
>
> To click on a link that precedes some text, you can use :beforeText.
> On the current Google page, for example:
>
> browser.link(:beforeText, 'survivors of the Haiti
> earthquake.").click
>
> You can also use :afterText, if necessary.
>
> Hope this helps!
>
> -Tiffany
>
> On Jan 13, 2:20 pm, xguarder  wrote:
>
> > I was wondering if someone could inform me on how to do the following:
>
> > 1. Retrieve link index number of a link. For instance, I know I can
> > find the link using ie.link(:text, "LinkText"), and I can also find
> > out the index number via irb. However, I want to be able to assign the
> > index number of that particular link to a variable on the fly.
>
> > 2. Is it possible to click on a link that immediately precedes a
> > particular text?
>
> > Thanks!
-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Links Question

2010-01-13 Thread Tiffany Fodor
Hi!

You could build an array of all the links and then get the index:

link_text = Array.new

browser.links.each do |link|
  link_text.push(link.text)
end

link_index = link_text.index('My link text').index


To click on a link that precedes some text, you can use :beforeText.
On the current Google page, for example:

browser.link(:beforeText, 'survivors of the Haiti
earthquake.").click

You can also use :afterText, if necessary.

Hope this helps!

-Tiffany


On Jan 13, 2:20 pm, xguarder  wrote:
> I was wondering if someone could inform me on how to do the following:
>
> 1. Retrieve link index number of a link. For instance, I know I can
> find the link using ie.link(:text, "LinkText"), and I can also find
> out the index number via irb. However, I want to be able to assign the
> index number of that particular link to a variable on the fly.
>
> 2. Is it possible to click on a link that immediately precedes a
> particular text?
>
> Thanks!
-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Close function of watir 1.6.5 not working fine

2010-01-11 Thread Tiffany Fodor
Hi Ankur!

What do you mean by the close function doesn't work fine.  Please
include the error message and behavior you're seeing to help in
troubleshooting the problem.

Thanks!

-Tiffany

On Jan 11, 4:02 am, Ankur Gera  wrote:
> Hi All,
>  When i run the below code close function of watir 1.6.5 doesn't work fine
> after handling a pop-up.But of watir 1.6.2 work fine in the same situation.
> I would request to the Watir developers please resolve this problem.
>
> require 'watir'
> require 'rubygems'
> require 'win32ole'
> require
> 'C:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\watir-1.6.2\\lib\\watir\\ie-class'
>
> #Note:- I have used the above require line because close function of Watir
> 1.6.5 was not working fine after handling a pop-up.
>
> $ie=Watir::IE.new
> $ai=WIN32OLE.new("AutoItX3.Control")
>
> $ie.goto("http://www.google.com/";)
> $ie.textfield(:name,"q").set("Ruby")
> $ie.button(:name,"btnG").click
>
> $ie.goto("http://www.autoitscript.com/autoit3/downloads.shtml";)
> $ie.image(:src,/download_autoit/).click_no_wait
>
> $ai.WinWait("File Download - Security Warning","",30)
> $ai.WinActivate("File Download - Security Warning")
> $ai.ControlClick("File Download - Security Warning","","&Save")
>
> $ai.WinWait("Save As","",30)
> $ai.WinActivate("Save As")
> $ai.ControlSend("Save As","","Edit1", "C:\AutoItV3.exe")
> $ai.ControlClick("Save As","","&Save")
>
> $ie.close  #Here at this place watir 1.6.5 close function doesn't work fine
> after handling the above pop-up but close function of watir 1.6.2 works fine
> in the same situation.
>
> For more information please check source code of close functions of both the
> versions(1.6.5 and 1.6.2) of Watir through this path :-
>
> C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.5\lib\watir\ie-class.rb
> C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\ie-class.rb
>
> Thanks & Regards,
> Ankur Gera
> TCS
-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Watir - Going down a to read the next element and perform click action on a button

2010-01-08 Thread Tiffany Fodor
Hi!

I'm having trouble following your description.  From the html code
you've provided, I don't see a button.  Have you tried accessing it as
a span?

ie.span(:class, 'button').click

Is your problem that the class may change?  If that's the case, you
can use a regex to specify the part that doesn't change:

ie.span(:class, /button/).click

Also, it there are some typos in the html, I'm not sure if it's a copy/
paste issue or if there are problems with the code:


-should be-


 Test
-should be-
 Test

Hope this helps!

-Tiffany

On Jan 8, 9:44 am, tester86  wrote:
> hi
>
> I have to click on a button by first reading the t1 element and then
> reading the a class and clicking on that action. her is the code:
>
> 
>  
>   
>  
> 
>    Test
>
> Does any one have any ideas as I have tired fire_events but I get
> unable to locate element?
>
> Thanks.
-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Monitoring browser activity with Watir?

2010-01-06 Thread Tiffany Fodor
Hi!

I haven't personally employed any timeout functionality, but here is a
discussion about it:

http://tinyurl.com/ya3t9eo

Hope this helps!

-Tiffany



On Jan 6, 2:36 pm, "chandu.tennety"  wrote:
> Any ideas?
-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Selecting radiobutton issue with Safariwatir

2010-01-06 Thread Tiffany Fodor
Oops, there's a typo in my two-argument example, it should be:

browser.radio(:class => 'radio_button', :index => 1).set

On Jan 6, 2:42 pm, Tiffany Fodor  wrote:
> Hi!
>
> Here's the wiki page on radio buttons:
>
> http://wiki.openqa.org/display/WTR/Radio+Buttons
>
> You're specifying arguments incorrectly, it should look something like
> this:
>
> browser.radio(:class, 'radio_button').set
>
> if you need to specify more than one argument:
>
> browser.radio(:class => 'radio_button', :index, 1).set
>
> Hope this helps!
>
> -Tiffany
>
> On Jan 6, 2:33 pm, QAguy  wrote:
>
> > I am working with the following code:
>
> > 
> > 
> > 
> > 
> > This video is
> > 
> > Protected,
> > 
> > which means only Contacts of the video owner are permitted to view it.
> > Your recipients may have to request permission to watch this video.
> > 
> > 
> > 
> > Privacy:
> > 
> >  > class="privacy_icon tooltip_mouseover tooltip_mouseout"
> > alt="Protected"/>
> > Protected
> > (change)
> > 
> >    > action="/video/inplace_set_video_privacy_redirect/649dd2bf1c10e9">
> > 
> > Privacy & Permissions
> > 
> >    > for="privacy_public" class="radio_button">Open Access 
>
> > (Anyone can view)
> >    > checked="checked"/> > class="radio_button">Protected (Only Contacts can view) > label>
> >    > for="privacy_private" class="radio_button">Private (Only
>
> > you can view)
> >    > name="mixing_policy" id="mixing_policy" class="check_box" 
> > disabled=""/> > class="check_box">Mixable?
>
> >   
> > 
>
> > 
> >   
> >     
> >   
> >     SAVE
> >   
> >   
> >     
> > 
> > 
> > 
> > CANCEL
> > 
> > 
> >   
> > 
>
> > I am trying to select one of the radiobuttons the submit the form to
> > update the items privacy value. I have tried the following but none
> > seem to work:
>
> > browser.radio(:class, "radio_button", "all_contacts").click
> > browser.button(:class, "tool tool_button submit").click
>
> > and
>
> > browser.radio(:class, "radio_button", "all_contacts").set
> > browser.button(:class, "tool tool_button submit").click
>
> > and
>
> > browser.radio(:id, "privacy_all_contacts", "all_contacts").click
> > browser.button(:class, "tool tool_button submit").click
>
> > Any help would be appericated.
>
> > Thanks.
> > QAguy
-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Selecting radiobutton issue with Safariwatir

2010-01-06 Thread Tiffany Fodor
Hi!

Here's the wiki page on radio buttons:

http://wiki.openqa.org/display/WTR/Radio+Buttons

You're specifying arguments incorrectly, it should look something like
this:

browser.radio(:class, 'radio_button').set

if you need to specify more than one argument:

browser.radio(:class => 'radio_button', :index, 1).set

Hope this helps!

-Tiffany

On Jan 6, 2:33 pm, QAguy  wrote:
> I am working with the following code:
>
> 
> 
> 
> 
> This video is
> 
> Protected,
> 
> which means only Contacts of the video owner are permitted to view it.
> Your recipients may have to request permission to watch this video.
> 
> 
> 
> Privacy:
> 
>  class="privacy_icon tooltip_mouseover tooltip_mouseout"
> alt="Protected"/>
> Protected
> (change)
> 
>    action="/video/inplace_set_video_privacy_redirect/649dd2bf1c10e9">
> 
> Privacy & Permissions
> 
>    for="privacy_public" class="radio_button">Open Access 
>
> (Anyone can view)
>    checked="checked"/> class="radio_button">Protected (Only Contacts can view) label>
>    for="privacy_private" class="radio_button">Private (Only
>
> you can view)
>    name="mixing_policy" id="mixing_policy" class="check_box" disabled=""/> for="mixing_policy" class="check_box">Mixable?
>
>   
> 
>
> 
>   
>     
>   
>     SAVE
>   
>   
>     
> 
> 
> 
> CANCEL
> 
> 
>   
> 
>
> I am trying to select one of the radiobuttons the submit the form to
> update the items privacy value. I have tried the following but none
> seem to work:
>
> browser.radio(:class, "radio_button", "all_contacts").click
> browser.button(:class, "tool tool_button submit").click
>
> and
>
> browser.radio(:class, "radio_button", "all_contacts").set
> browser.button(:class, "tool tool_button submit").click
>
> and
>
> browser.radio(:id, "privacy_all_contacts", "all_contacts").click
> browser.button(:class, "tool tool_button submit").click
>
> Any help would be appericated.
>
> Thanks.
> QAguy
-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: watir does not click on button when specified

2010-01-05 Thread Tiffany Fodor
It looks like this may be a button or span, not a link.

I don't think a span or button can be identified with the href in
Watir, so use the id:

$b.span(:id, 'tc676').click

-or-

$b.button(:id, 'tc676').click

Hope this helps!

-Tiffany


On Jan 5, 3:28 pm, tester86  wrote:
> Selenium finds the button (here is the selenium)
>
> //a...@id=tc676]/span/label
>
> but it does not work in Watir?
>
> On Jan 5, 4:23 pm, tester86  wrote:
>
> > Hi
>
> > I have the following watir code:
>
> > $b.link(:href, "javascript:;").click
>
> > but it does not click on the button.
>
> > 
> > 
> > Reset
> > 
> > 
>
> > Does any one have any ideas?
>
> > Thanks
-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Inputting text into a search field that has no input button

2010-01-04 Thread Tiffany Fodor
Hi!

Check your text field to see if there is a javascript event associated
with it.  If there is, you can fire it with:

ie.text_field(:name, 'my_field').fire_event('my_js_event')

Hope this helps!

-Tiffany


On Jan 4, 1:46 pm, xguarder  wrote:
> I am trying to enter text into a search field (textField box).
> However, there is no button to click on to submit the text. You need
> to hit enter after typing it into the text box.
> Any ideas on how I can send the ENTER command directly to the textbox
> itself? I tried using the send_keys method, but it ends up sending the
> command to the entire browser itself, not the text field.
> Thanks in advance!

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Reg: selectbox

2010-01-04 Thread Tiffany Fodor
If you want to keep one of the values fixed, just set it as I showed
and then iterate through the list with one of the loops rather than
both of them.

You can get the text from the table where the results are displayed:

result_table = ie.table(:class, 'XEtbl_sub')

from_text = result_table[3][1].text  #row3, col1
to_text = result_table[3][3].text   #row3, col3


-Tiffany

On Jan 4, 6:18 am, Rinku Dev  wrote:
> I was able to automate simple conversion as said by u tiffany.
>
> but my main concern is how to keep one value fixed from one selectbox(say
> from the 'From' select box e..g. USD) and I would like to get the converted
> currency value of 1 USD to others
>
> I hope this will clear all of urs idea. and definitely here is some
> technique to keep all values either in arrays and execute one by one ori
> dnt know.
>
> pls help.
>
> On Mon, Jan 4, 2010 at 5:40 AM, Tiffany Fodor  wrote:
> > Hi!
>
> > To perform a simple conversion:
>
> > ie.text_field(:name, 'Amount').set('100')
> > ie.select_list(:name, 'From').select('USD United States Dollars')
> > ie.select_list(:name, 'To').select('JPY Japan Yen')
> > ie.button(:class, 'sprite nhgobtn').click
>
> > I'm not sure what you mean by loop code - are you trying to select
> > each available entry in the 'From' and 'To' currency dropdowns?  If
> > you're not performing data-driven tests and just need the available
> > options:
>
> > from_options = ie.select_list(:name, 'From').options
> > to_options = ie.select_list(:name, 'To').options
>
> > -or-
>
> > from_options = ie.select_list(:name, 'From').getAllContents
> > to_options = ie.select_list(:name, 'To').getAllContents
>
> > You can then cycle through the options:
>
> > #cycle through each from option
> > from_options.each do |from_option|
> >  #cycle through each to option
> >  to_options.each do |to_option|
> >    ie.goto('www.xe.com')
> >    ie.text_field(:name, 'Amount').set('100')
> >    ie.select_list(:name, 'From').select(from_option)
> >    ie.select_list(:name, 'To').select(to_option)
> >    ie.button(:class, 'sprite nhgobtn').click
> >  end
> > end
>
> > I've tried to use the 'Convert Again' option, but clicking it using
> > each available parameter:
>
> > ie.button(:src, /btn_go/).click
> > ie.button(:alt, 'Submit').click
> > ie.button(:index, 1).click
>
> > gives the error 'There are no search results for this search.  You may
> > want to talk to your development team to see if there is some other
> > action you need to perform.  In the mean time, the best I can do is to
> > always go back to the home page.
>
> > FYI - When I tested my code above, the site caused IE to crash, the
> > next time, instead of being taken to 'www.xe.com'as I expected, I was
> > taken to 'www.xe.com/ucc'.  This site does not appear to behave
> > consistently.
>
> > Also, you may have trouble automating this site because of the
> > continuous refreshing due to the advertising.  I'm not sure what the
> > timing is - if you perform your actions before the refresh time, you
> > may be OK.
>
> > Hope this helps!
>
> > -Tiffany
>
> > On Jan 3, 9:57 am, Rinku Dev  wrote:
> > > Hi,
>
> > > I am new to Watir.
> > > I wanted to automate a web application, where there are two dropdown
> > > listbox with each 5 items listed.
>
> > > The scenario is "Currency conversion".
> > > We have to enter a value in a textbox and select the listed items from
> > > the two listboxes and click OK button and to get the value other
> > > textbox.
>
> > > e.g. The "XE Quick Currency Converter" section ofhttp://www.xe.com/
> > > 1. Go tohttp://www.xe.com/
> > > 2. Enter the currency value (for which we need to get the converted
> > > currency value)
> > > 3. Select one option from "From this currency:" dropdown listbox
> > > 4. Select one option from "To this currency:" dropdown listbox
> > > 5. Click on "GO" button
>
> > > Here, I would like to get help on the the TWO dropdown listboxes. Plz
> > > help me out to get the loop code, that will handle the TWO dropdown
> > > listboxes.
>
> > > Regards,
> > > - RDev
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Watir General" group.
> > To post to this group, send email to watir-general@googlegroups.com
> > Before posting, please read the following guidelines:
> >http://wiki.openqa.org/display/WTR/Support
> > To unsubscribe from this group, send email to
> > watir-general-unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Reg: selectbox

2010-01-03 Thread Tiffany Fodor
Hi!

To perform a simple conversion:

ie.text_field(:name, 'Amount').set('100')
ie.select_list(:name, 'From').select('USD United States Dollars')
ie.select_list(:name, 'To').select('JPY Japan Yen')
ie.button(:class, 'sprite nhgobtn').click

I'm not sure what you mean by loop code - are you trying to select
each available entry in the 'From' and 'To' currency dropdowns?  If
you're not performing data-driven tests and just need the available
options:

from_options = ie.select_list(:name, 'From').options
to_options = ie.select_list(:name, 'To').options

-or-

from_options = ie.select_list(:name, 'From').getAllContents
to_options = ie.select_list(:name, 'To').getAllContents

You can then cycle through the options:

#cycle through each from option
from_options.each do |from_option|
  #cycle through each to option
  to_options.each do |to_option|
ie.goto('www.xe.com')
ie.text_field(:name, 'Amount').set('100')
ie.select_list(:name, 'From').select(from_option)
ie.select_list(:name, 'To').select(to_option)
ie.button(:class, 'sprite nhgobtn').click
  end
end

I've tried to use the 'Convert Again' option, but clicking it using
each available parameter:

ie.button(:src, /btn_go/).click
ie.button(:alt, 'Submit').click
ie.button(:index, 1).click

gives the error 'There are no search results for this search.  You may
want to talk to your development team to see if there is some other
action you need to perform.  In the mean time, the best I can do is to
always go back to the home page.

FYI - When I tested my code above, the site caused IE to crash, the
next time, instead of being taken to 'www.xe.com' as I expected, I was
taken to 'www.xe.com/ucc'.  This site does not appear to behave
consistently.

Also, you may have trouble automating this site because of the
continuous refreshing due to the advertising.  I'm not sure what the
timing is - if you perform your actions before the refresh time, you
may be OK.

Hope this helps!

-Tiffany


On Jan 3, 9:57 am, Rinku Dev  wrote:
> Hi,
>
> I am new to Watir.
> I wanted to automate a web application, where there are two dropdown
> listbox with each 5 items listed.
>
> The scenario is "Currency conversion".
> We have to enter a value in a textbox and select the listed items from
> the two listboxes and click OK button and to get the value other
> textbox.
>
> e.g. The "XE Quick Currency Converter" section ofhttp://www.xe.com/
> 1. Go tohttp://www.xe.com/
> 2. Enter the currency value (for which we need to get the converted
> currency value)
> 3. Select one option from "From this currency:" dropdown listbox
> 4. Select one option from "To this currency:" dropdown listbox
> 5. Click on "GO" button
>
> Here, I would like to get help on the the TWO dropdown listboxes. Plz
> help me out to get the loop code, that will handle the TWO dropdown
> listboxes.
>
> Regards,
> - RDev

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: unexpected popup window which has no title ::: need help

2009-12-29 Thread Tiffany Fodor
Thanks for providing the solution that worked for you.  It may help
someone else with the same problem.

-Tiffany

On Dec 28, 2:17 am, Pallavi Sharma  wrote:
> Chetan
>
> If its an unexpected window with no title and you just wish to detect and
> close it, then Auto IT script which is provided in popup helps would work.
>
> I am facing the difficulty in identifying the specific button like OK,
> Cancel
>
> Adding watir general groups for everyone's benefit.
>
> Regards
> Pallavi.
>
> On Mon, Dec 28, 2009 at 2:45 PM, Chetan Patel  wrote:
> > HI Pallavi,
>
> > Greetings,
>
> > This is chetan patel and working as software eng at indusface ,Baroda
> > ,Gujarat.
>
> > I have got your reference from Google group (firewatir)
>
> > I am facing same problem u have , how to manage  unexpected popup window
> > which has no title(I have installed autoIt on my machine)
>
> > Please send me snap of code if you have got any solutions.
>
> > Thanks,
>
> > Chetan J.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: IE 8 Crashes

2009-12-29 Thread Tiffany Fodor
Hi Jeff!

I haven't heard of this problem.  Can you provide any errors you're
getting when the browser crashes?

Have you verified that you can manually access the URL in an IE8
browser on this system?  If so, have you tried stepping through
opening a new browser and then going to the site through irb?  You
could also try the same steps with a Firefox browser to narrow the
problem down a bit.

Hope this helps!

-Tiffany

On Dec 29, 9:51 am, Jeff Savin  wrote:
> Hi,
>
> I have a simple automation application built in Ruby 1.8.6 and Watir
> 1.6.5.  The application takes control of the browser and goes through
> 3 or 4 pages of an online website. It fills in a couple forms and
> pushes a few buttons, nothing fancy.
>
> This application works as tested on several computers, including XP
> and Vista, IE 7 and 8.  On one particular computer, Windows Vista Home
> Premium Edition SP2 and IE 8, the application successfully opens a new
> browser, but the second it sends an automation command (browser.goto),
> IE8 crashes.  This happens each and every time and I'm wondering if
> anyone else has had the same experience.
>
> Thanks,
> Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Watij using JRuby, starting LOC

2009-12-28 Thread Tiffany Fodor
Have you tried posting you question on the Watij Google Group?

http://groups.google.com/group/watij/

Hope this helps!

-Tiffany

On Dec 28, 11:52 am, karim rayani  wrote:
> I know this is not the exact place to put this question, but can any
> one help me in using jruby with Watij library,
>
> I guess JRuby can invoke classes in the Java jar files. I have set the
> class path and copied the jar files to the lib folder, i need help in
> starting the browser invokation
>
> if any one has any ideas please help
>
> Thanx

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: watir ExampleTestHarness.rb help

2009-12-22 Thread Tiffany Fodor
Hi Venkat!

You can break out your tests however you like and then add new ranges
to your spreadsheet to specify if they should be run.  For example,
you might want to break each project out into it's own TestSuite.

I think you'll have the most success on your specific project if you
have a good understanding of Test::Unit.  Here's the rdoc on it:

http://ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html

Hope this helps!

-Tiffany

On Dec 22, 12:55 am, venkat  wrote:
> Thankful to you if anybody helps me in watir coding.
>
> Using Xls Class in the WatirTestHarnessExample, we can run testcases like..
>         If $runTests["testcase_01"] == "Yes"
>           testcase($xxx)
>
> but I want to run the testcases when the Proejct == Yes & Module_01 == Yes.
>
> Following is my testdata:
>       *Project* * * *Module* * * *Testcase* *Run?* *Project_Name* Yes *
> Module_01* Yes TestCase_001 Yes   TestCase_002 Yes   TestCase_003 Yes      *
> Module_02* Yes TestCase_001 Yes   TestCase_002 No   TestCase_003 Yes
>
> Thanks in advance...
> venkat

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Unable to Picklist of data from Excel - Datadriven test using xls class

2009-12-17 Thread Tiffany Fodor
Hi Venky!

The 'PickLists' tab in the spreadsheet is meant to hold data for
selection in the other tabs.  This is to make it simpler to enter
values that are commonly used.  For example, the cell that holds the
URL value in the 'Setup' tab functions as a dropdown with the options
from the 'PickLists' tab.

The first table in the 'Setup' tab (A1:B6) is for data used for the
test run - the URL, usernames, passwords, etc.

The second table in the 'Setup' tab (A12:B15) specifies which tests to
run and the 'Yes/No' value in those cells are used the Test::Unit
framework code.  If you're specifying first a project to run and then
the methods in that project, you'll need to add some more code to
break it out at the method level.

Hope this helps!

-Tiffany

On Dec 17, 5:56 am, venkat  wrote:
> please help me if anybody tried with the watir wiki's
> DataDrivenTestHarnessExample - "Picklist" speadsheet data fetching from
> TestData.xls
>
> I have the data in Testdata.xls as the following:
>    *Project* *Run* Project1 Yes
>
>     *Module* *Run* Module1 Yes Module2 Yes Module3 Yes Module4 No
>
> What could be the watir code, any clues? if wants to run tests where the Run
> = Yes irrespective of Project name or ModuleName. My script should pick the
> Cell data from Project or Module columns to RUN tests if it is Yes.
>
> I tried like this...but could not succeed.
> --
> begin
>     xlFile = XLS.new("Dir.pwd + '../TestData.xls")
>     $Runtests = xlFile.getRowRecords("A1:B5", "Sheet1")
> ensure
>     xlFile.close
> end
> $runTests.each do |record|
> -
> please help...any thoughts..
>
> thanks,
> -venky

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Support Sheriff

2009-12-10 Thread Tiffany Fodor
Thanks to Željko and the rest of the Watir team for your confidence in
me.  I'm honored to be counted among such a great group of people.

I'll do my best not to let it go to my head.  ;-)

-Tiffany


On Dec 10, 3:50 pm, Željko Filipin 
wrote:
> Watir team had a little chat and we decided it would be a good idea to grow.
>
> I am glad I can announce that Tiffany Fodor and Wesley Chen have accepted to
> be added to Watir community team with title of Support Sheriff:
>
> http://watir.com/team/
>
> Tiffany answers a lot of questions and Wesley is helping us moderate the
> group. I hope both of them will continue with business as usual.
>
> If you have a nice word for them, now is the time. :)
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Wătir

2009-12-10 Thread Tiffany Fodor
If I'd read the entire thread more carefully, I would have noticed
that you had the same great idea:

> Maybe we should record Bret saying something like this. :)

> http://www.paul.sladen.org/pronunciation/

Sorry about that!  :)

-Tiffany

On Dec 10, 3:39 am, Željko Filipin 
wrote:
> On Thu, Dec 10, 2009 at 1:03 AM, Tiffany Fodor  wrote:
> >http://dictionary.reference.com/browse/water (see the speaker icon
> > next to the word 'water')
>
> Great idea. :) I will add it to the web site.
>
> Željko

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Wătir

2009-12-09 Thread Tiffany Fodor
Hi all!

Would it be possible to add an audio pronunciation like they do at
dictionary.com on watir.com?

http://dictionary.reference.com/browse/water  (see the speaker icon
next to the word 'water')

It might be another cute gizmo to add to Watir.com

-Tiffany

On Dec 9, 4:39 am, Željko Filipin 
wrote:
> Bret suggested we should add breve accent over the "a" in "watir" so people
> would easily know how to pronounce it.
>
> What do you think?
>
> More information:
>
> http://ruby5.envylabs.com/episodes/32-episode-31-december-1-2009/stor...
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: different table of character between watir 1.6.2 and watir 1.6.5

2009-12-09 Thread Tiffany Fodor
Hi Fabien!

There was a change in 1.6.5 to use UTF-8 encoding by default.  This
may be causing your problem.  If you want it to work as it did in
1.6.2, ry changing line 14 in the watir-1.6.5\lib\watir\win32ole.rb
file from this:

WIN32OLE.codepage = WIN32OLE::CP_UTF8

to this:

WIN32OLE.codepage = WIN32OLE::CP_ACP

Hope this helps!

-Tiffany


On Dec 9, 3:41 pm, Fabien  wrote:
> The result of  puts $ie2.text with Watir 1.6.2 is
>  IE2 TEXT 
> Appartement t4 parc les perrussons marignane Ventes immobilières
> Bouches-du-Rhône - leboncoin.fr Offres Ventes immobilières - Bouches-
> du-Rhône
>
> Accueil  |  Déposer une annonce  |  Offres  |  Demandes  |  Mes
> annonces  |  Compte Pro  |  Aide
>
> The result of puts $ie2.text with Watir 1.6.5 is
>  IE2 TEXT 
> Appartement t4 parc les perrussons marignane Ventes immobilières
> Bouches-du-Rhône - leboncoin.fr Offres Ventes immobilières - Bouches-
> du-Rhône
>
> Accueil  |  Déposer une annonce  |  Offres  |  Demandes  |  Mes
> annonces  |  Compte Pro  |  Aide
>
> The code is the same 
> How to do so as to have the same result than 1.6.2 with 1.6.5 ?
>
> Best Regards,
> Fabien

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: help me in using Excel DataDrivenTestHarnessExample

2009-12-09 Thread Tiffany Fodor
Venky,

All of the rows are contained in your variable $addNotification and in
the solution below, you're iterating through each with the
$addNotification.each do |notification|

If you're trying to select all the values in a select_list, you can
use the select_list.options or select_list.getAllContents method to
get the contents of the select_list and then use the
select_list.select method to set the ones you want (or all of them).
If you need to compare the values in the select_list to the values in
$addNotification first, you can do that using Ruby hash and array
methods.

Hope this helps!

-Tiffany

On Dec 9, 12:01 am, venkat  wrote:
> Hi Tiffany,
> thanks and no confusion, we are on the same page.
>
> $addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")
>
> $addNotification.each do |notification|
>  if notification['Priority'] == 'Urgent'
>    $ie.select_list( :name , "tusers").select(record["Select_Users"]) # here
> it gets only 1row but i want it to get all rows, can you please provide me
> the syntax.
>    $ie.button(:name,"select").click
>
> thanks
>
> On Wed, Dec 9, 2009 at 9:54 AM, Tiffany Fodor  wrote:
> > Hi Venky,
>
> > The formatting on your example data was lost, so it's hard to see
> > exactly what you mean.  It seems you're trying to gather the data
> > conditionally based on the priority.  I'd suggest grabbing all the
> > data - make your range A1:E6 - and then deal with the data in your
> > code.  The headings in row 1 will be the hash keys you use to get at
> > the data in each cell of the subsequent rows.
>
> > $addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")
>
> > $addNotification.each do |notification|
> >  if notification['Priority'] == 'Urgent'
> >    #do whatever you need to with 'Urgent' priority users
> >  elsif notification['Priority'] == 'High'
> >    #do whatever you need to with 'High' priority users
> >  else
> >    #do whatever you need to with other users
> > end
>
> > Hope this helps!
>
> > -Tiffany
>
> > On Dec 8, 6:39 am, venkat  wrote:
> > >  Can any one please help me out in getting the multi row data from a
> > column
> > > using watir xls interface class.
>
> > > I have taken the DataDrivenTestHarnessExample as my source from Watir
> > > OpenQA.
>
> > > I have added test data into a sheet "Sheet4"
> > > Sheet4 has columns with data as follows.
>
> > > A                        B                       C
> > > D                              E
> > > Type                   Priority              Select_Users
> > > Remove_Users      Yes
> > >  Information         High                  User1
> > > User1                     No
> > >                              Medium
> > > User2                  User2
> > >                               Low                  User3
> > >                                                         User4
> > >                                                         User5
>
> > > I have to select the
> > >                                Type as "INFORMATIONAL"
> > >                             If Priority as Urgent then Select_Users = all
> > > (6rows)
> > >                            else Priority is other than 'urgent then only
> > 2
> > > records from column Select_Users .
>
> > > I am using the following syntax to get a row of record.
> > > $addNotification = xlFile.getRowRecords("A2:E6", "Sheet4")
> > > but apart from getting the row, i need to get all records from the column
> > > 'Select_Users'.
>
> > > Thanking you very much in adavance.
>
> > > Venky
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Watir General" group.
> > To post to this group, send email to watir-general@googlegroups.com
> > Before posting, please read the following guidelines:
> >http://wiki.openqa.org/display/WTR/Support
> > To unsubscribe from this group, send email to
> > watir-general-unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: help me in using Excel DataDrivenTestHarnessExample

2009-12-08 Thread Tiffany Fodor
Hi Venky,

The formatting on your example data was lost, so it's hard to see
exactly what you mean.  It seems you're trying to gather the data
conditionally based on the priority.  I'd suggest grabbing all the
data - make your range A1:E6 - and then deal with the data in your
code.  The headings in row 1 will be the hash keys you use to get at
the data in each cell of the subsequent rows.

$addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")

$addNotification.each do |notification|
  if notification['Priority'] == 'Urgent'
#do whatever you need to with 'Urgent' priority users
  elsif notification['Priority'] == 'High'
#do whatever you need to with 'High' priority users
  else
#do whatever you need to with other users
end

Hope this helps!

-Tiffany


On Dec 8, 6:39 am, venkat  wrote:
>  Can any one please help me out in getting the multi row data from a column
> using watir xls interface class.
>
> I have taken the DataDrivenTestHarnessExample as my source from Watir
> OpenQA.
>
> I have added test data into a sheet "Sheet4"
> Sheet4 has columns with data as follows.
>
> A                        B                       C
> D                              E
> Type                   Priority              Select_Users
> Remove_Users      Yes
>  Information         High                  User1
> User1                     No
>                              Medium
> User2                  User2
>                               Low                  User3
>                                                         User4
>                                                         User5
>
> I have to select the
>                                Type as "INFORMATIONAL"
>                             If Priority as Urgent then Select_Users = all
> (6rows)
>                            else Priority is other than 'urgent then only 2
> records from column Select_Users .
>
> I am using the following syntax to get a row of record.
> $addNotification = xlFile.getRowRecords("A2:E6", "Sheet4")
> but apart from getting the row, i need to get all records from the column
> 'Select_Users'.
>
> Thanking you very much in adavance.
>
> Venky

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Get unexpected error message when use Excel as report.

2009-12-05 Thread Tiffany Fodor
Oops, sorry about that - I meant the win32-api gem.

Actually, I just checked to see what I have and I have a boatload of
windows gems:

win32-api (1.4.0, 1.1.0, 1.0.6)
win32-clipboard (0.4.1)
win32-dir (0.3.1)
win32-eventlog (0.4.3)
win32-file (0.5.3)
win32-file-stat (1.2.3)
win32-process (0.6.0, 0.5.9, 0.5.8, 0.5.1)
win32-sapi (0.1.3)
win32-sound (0.4.0)
windows-api (0.3.0, 0.2.3)
windows-pr (1.0.2, 0.8.7, 0.8.5, 0.6.2)

-Tiffany

On Dec 5, 5:49 pm, Tiffany Fodor  wrote:
> Hey Wesley!
>
> Since you're not getting an error that says there is no method 'range'
> for a nil value, it doesn't seem your problem is data related.  Have
> you tried re-installing the Win32ole gem?  (just a guess)
>
> -Tiffany
>
> On Dec 5, 1:17 am, Wesley Chen  wrote:
>
> > Thanks, Ethan,
> > I have searched a lot in google.
> > I just want to ask anybody who has met this kind of problem.
> > I think in the group, there are many experts who are good at excel class.
>
> > Thanks.
> > Wesley Chen.
> > For life, the easier, the better.
>
> > On Sat, Dec 5, 2009 at 3:36 PM, Ethan  wrote:
> > > Does this have anything to do with Watir?
>
> > > @worksheet seems to be a win32ole corresponding to something in excel,
> > > which isn't what watir deals with. it's not very clear from the code 
> > > snippet
> > > (and screenshots of code are not a good way to convey information - just
> > > copy and paste) what this is, but it doesn't appear to be using watir.
>
> > > If this same script was working before, my only advice is the usual stuff
> > > to try of rebooting, reverting any changes to the system that have been
> > > made, and googling the error code to see if any results look informative.
> > >http://www.google.com/search?q=800a01a8
>
> > > On Sat, Dec 5, 2009 at 02:13, Wesley Chen  wrote:
>
> > >> The report always runs OK before, but today, it displays unexpected error
> > >> message as below:
>
> > >> *E:/NetbeansProjects/qa-test-scripts/Coach
> > >> tool/training/Workout/../../../lib/reporting.rb:178:in `method_missing':
> > >> range (WIN32OLERuntimeError)
> > >>     OLE error code:0 in 
> > >>       
> > >>     HRESULT error code:0x800a01a8*
>
> > >> The method is as below:
> > >> *def pages_visited()
> > >>         url_cleanup()
> > >>         i = 0
> > >>         @worksheet.range("d"+ (10+total_tests()).to_s)['Value'] = ["Pages
> > >> Visited"]
> > >>         @worksheet.range("d"+ 
> > >> (10+total_tests()).to_s).HorizontalAlignment
> > >> = WIN32OLE::XlCenter
> > >>         @worksheet.range("d"+
> > >> (10+total_tests()).to_s).Interior['ColorIndex'] = 11
> > >>         @worksheet.range("d"+ (10+total_tests()).to_s).Font['ColorIndex']
> > >> = 2
> > >>         @worksheet.range("d"+ (10+total_tests()).to_s).Font.Bold = true
> > >>         @urls.each do |page|
> > >>             @worksheet.range("d"+ (i+11+total_tests()).to_s).Value =
> > >> [page]
> > >>             i += 1
> > >>         end
> > >>     end*
>
> > >> Please see the two pictures attached for details.
> > >> code.png means the code;
> > >> ouput.png means the output result. The output result is as expected.
>
> > >> Thanks.
> > >> Wesley Chen.
> > >> For life, the easier, the better.
>
> > >> --
> > >> You received this message because you are subscribed to the Google Groups
> > >> "Watir General" group.
> > >> To post to this group, send email to watir-general@googlegroups.com
> > >> Before posting, please read the following guidelines:
> > >>http://wiki.openqa.org/display/WTR/Support
> > >> To unsubscribe from this group, send email to
> > >> watir-general-unsubscr...@googlegroups.com
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/watir-general
>
> > >  --
> > > You received this message because you are subscribed to the Google Groups
> > > "Watir General" group.
> > > To post to this group, send email to watir-general@googlegroups.com
> > > Before posting, please read the following guidelines:
> > >http://wiki.openqa.org/display/WTR/Support
> > > To unsubscribe from this group, send email to
> > > watir-general-unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


  1   2   3   >