Re: [wtr-general] how to get slectlist box option value

2011-02-25 Thread Tim Koopmans
b.select_list(:name = phone_type).options.collect {|o| o.text[/\w/]}

or this

b.goto 'http://tinyurl.com/6f8v92t'


Cheers,
Tim



On Fri, Feb 25, 2011 at 5:28 PM, Rajiv Nanduani
rajivkumarnandv...@gmail.com wrote:
 Hi All,

 I am facing a problem with watir for list box object. I have to extrach the
 value of select item in list box instead of text value Like..

 select size=1 name=phone_type
             option value=- Select One --/option
             option selected= value=MMobile Phone/option
             option value=ODaytime Phone/option
             option value=HEvening Phone/option
         /select

 Here i need the value property value like M , O , H

 please suggest how to get this value using watir/ruby

 --
 RAJIV KUMAR

 http://rajivkumarnandvani.wordpress.com/
 http://learnqtphelp.blogspot.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


-- 
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


Re: [wtr-general] how to run watir in background on linux

2011-02-25 Thread Tim Koopmans
why don't you try watir-webdriver with HtmlUnit driver for headless automation.

Cheers,
Tim



On Fri, Feb 25, 2011 at 7:03 PM, warlock vinay.beck...@gmail.com wrote:
 hi guys
 how to run watir in background on linux
 i tried the -b tag to the script.. but this doesnt work on linux...

 basically if i wanna run it a 100 times i dont want the browser to
 open up those many times.. too much resource going there.. :(

 -warlock

 --
 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


-- 
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] how to run watir in background on linux

2011-02-25 Thread warlock
hi guys
how to run watir in background on linux
i tried the -b tag to the script.. but this doesnt work on linux...

basically if i wanna run it a 100 times i dont want the browser to
open up those many times.. too much resource going there.. :(

-warlock

-- 
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 to get/retrieve value

2011-02-25 Thread Chuck van der Linden
appreciate your trying to help out..  The capcha thing is a good
challenge, but so far the best solution for most folks is something
like

1) don't test against production sites
 2) employ a web.config setting or similar method to disable the
actual captcha and use a static answer.
 3) turn that setting on in the test environment.

  4) avoid clients who don't realize that if you have something on
your production site designed to prevent attacks on the site using
automated scripts, it ALSO prevents testing against the same site
using automated scripts.

 5) if you can't do 4, find a really good, SIMPLE analogy you can use
to explain why it won't work to the clueless client

sir, its as if you put a door on the building that is designed to
only admit living breathing humans, and specifically to keep out
robots.  Then you are telling me to make robot to go through that
door, and start doing stuff inside the building

if 5 doesn't work, then just start smashing your hand with a rock, it
will hurt yes, maybe even more than dealing with the client, but at
least you will be in control of the pain.

On Feb 24, 11:54 pm, Tim Koopmans tim.ko...@gmail.com wrote:
 Chuck actually I tend to agree with all your comments there. I've been
 away from wtr-general for a while and am now amazed (after a week of
 trawling) at the quality, or lack-thereof, of requests for help.

 In hindsight, maybe he should just try
 gem install captchavundarbarbreaker

 Still, I always like a challenge and was tempted to put more thought
 into it. Maybe next time =)

 Cheers,
 Tim

 On Fri, Feb 25, 2011 at 6:23 PM, Chuck van der Linden sqa...@gmail.com 
 wrote:







  Tim,

  I'm not saying he's a spammer..  (but one could be watching)

  I'm applying the LART with such vigor because he's been told about 4
  times 'can't do that' and he keeps asking as if we're not telling him
  the truth or the answer will somehow change, or there is some 'secret
  solution' using some 'magic gem' that we're just not telling him
  about.

  (sh don't tell anyone, but if you find the config.sys file and put
  User equals-sign ID ten T on the first line in that file that will
  make it work)

  and btw  if he CAN break the captcha using any of the tools you
  suggest, I'd recommend he notify his client that they need a better
  captcha, since if it wont stop him, then it's not likely to stop the
  spammers.

  BTW  want to know how spammers break captchas?  they crowdsource it.
  They pay people in lesser developed nations something like a tenth of
  a cent per captcha solved.  they use scripts that capture that part of
  the screen, send the image to a system that sends it to someone logged
  into to it who 'solves' the puzzle and sends the 'solution' back to
  the spammer's script where it is entered and then they can submit
  their spam.  since most captchas are just random numbers and letters
  you dont even have to speak a foreign language to get such a job..

 http://www.nytimes.com/2010/04/26/technology/26captcha.html?_r=1hpw

  So assuming that his client wants to pay for this service, there is a
  way around it (which as I said, puts a human in the loop)

  On Feb 23, 2:14 am, Tim Koopmans tim.ko...@gmail.com wrote:
  So let's just go easy on the guy!

  It's not an entirely unreasonable request, and not really up to us to judge
  it. It may well be legit!

  Depending on the quality of the CAPTCHA it may in fact be possible. But
  you'd probably have to wrap in an OCR library with some image processing 
  (to
  TIFF) beforehand.

  For image processing I'd recommend rmagick[1].
  For OCR you could look at gocr[2], ocrad[3] or tesseract[4]

  [1]http://rmagick.rubyforge.org/
  [2]http://jocr.sourceforge.net/
  [3]http://www.gnu.org/software/ocrad/
  [4]http://code.google.com/p/tesseract-ocr/

  Good luck with that!

  Cheers,
  Tim

  On Wed, Feb 23, 2011 at 8:07 PM, Chuck van der Linden 
  sqa...@gmail.comwrote:

   THERE IS NO SUCH GEM.

   NO.  HELL NO. and a Thousand Times I tell you NO.

   The purpose of a captcha is a challenge to prove that it is a human at
   the computer, to prevented scripted attacks on the site from spammers
   and the like.  The site cannot tell a scripted interaction from a
   tester from a scripted interaction from a spammer or other attacker.

   if the client needs you to test against production then you need to
   test pages with a captcha manually, or they would need to temporarily
   disable the captcha for the duration of the test, or set it to use a
   fixed answer for the duration of the test.

   You CANNOT script against a working captcha without a human in the
   loop.  That's the design and purpose of a captcha.  And if you somehow
   found a way to do that, then the client needs a better quality
   captcha, because if you can figure out a way, so will the spammers.

   NOBODY who isn't a spammer is likely to develop a means to get around
   captchas because we know it would then be immediately 

Re: Re: [wtr-general] how to get slectlist box option value

2011-02-25 Thread rajivkumarnandvani

thanks All
I got this from this URL  
http://rdoc.info/gems/watir/1.7.0/Watir/SelectList:option


Given the following html:

select id=gender
option value=UUnknown/option
option value=M selectedMale/option
option value=FFemale/option
/select

get the value attribute of option with visible text 'Female'

browser.select_list(:id, 'gender').option(:text, 'Female').value #= 'F'

or find out if the value 'M' is selected

browser.select_list(:id, 'gender').option(:value, 'M').selected #= true

* attribute - Symbol :value, :text or other attribute - how we find an item  
in the select box

* value - string or reg exp - what we are looking for

just to inform Priya.

By your example it will not work because
browser.select_list(:name, phone_type).select(M)
Select(M) M is the value while here it required Text Mobile Phone

browser.select_list(:name, phone_type).select(Mobile Phone)

cheers :)



On , Tim Koopmans tim.ko...@gmail.com wrote:

b.select_list(:name = phone_type).options.collect {|o| o.text[/\w/]}





or this





b.goto 'http://tinyurl.com/6f8v92t'







Cheers,



Tim









On Fri, Feb 25, 2011 at 5:28 PM, Rajiv Nanduani



rajivkumarnandv...@gmail.com wrote:



 Hi All,






 I am facing a problem with watir for list box object. I have to extrach  
the



 value of select item in list box instead of text value Like..











 - Select One --



 Mobile Phone



 Daytime Phone



 Evening Phone











 Here i need the value property value like M , O , H







 please suggest how to get this value using watir/ruby







 --



 RAJIV KUMAR







 http://rajivkumarnandvani.wordpress.com/



 http://learnqtphelp.blogspot.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









--


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





watir-general@googlegroups.com


watir-general+unsubscr...@googlegroups.com  
target=_blankhttp://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


Re: [wtr-general] Re: Need to get/retrieve value

2011-02-25 Thread Željko Filipin
On Fri, Feb 25, 2011 at 9:12 AM, Chuck van der Linden sqa...@gmail.com
wrote:
 sir, its as if you put a door on the building that is designed to
 only admit living breathing humans, and specifically to keep out
 robots.  Then you are telling me to make robot to go through that
 door, and start doing stuff inside the building

This is great. :)

Ž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] unknown property or method document HRESULT error 0x800706b5

2011-02-25 Thread TCBlues
Watir: 1.6.5
Windows 7 64 bits
Ruby 1.8.7

When running this code:

require 'watir'
nav=Watir::IE.new()
nav.goto(http://www.google.com;)
puts nav.url
nav.close()


I get this error:
unknown property or method `document'HRESULT error code:
0x800706b5  The interface is unknown.

I was surfing the internet but nothing is working in my case

-- 
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


Re: [wtr-general] Re: Recent Stack Overflow Questions Tagged Watir

2011-02-25 Thread Željko Filipin
http://stackoverflow.com/questions/5094108/jquery-watir-event-handlers-not-working
http://stackoverflow.com/questions/5116950/finding-sibling-of-a-link-while-using-watir-webdriver

-- 
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 at Facebook

2011-02-25 Thread Željko Filipin
On Tue, Feb 22, 2011 at 4:02 PM, Željko Filipin 
zeljko.fili...@wa-research.ch wrote:
 I did not find a way how to create simple URL like
https://www.facebook.com/pages/Watir or even https://www.facebook.com/Watir,
if somebody knows how to do it, please let me know.

Found how to do it (at https://www.facebook.com/username/). Looks like the
page had to have certain number of likes. (By the way, likes stopped at
30, feel free to like it.)

Once we set the page name, we can not change it.

https://www.facebook.com/watir is taken.

watir.com is not available, I guess you can not have dot (.) in the url.

wtr is too short, it insists on 5 characters.

watirdotcom, watircom, watirproject are available.

What do you think? Any other suggestions?

Ž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 at Facebook

2011-02-25 Thread sdemian
I like watircom - very simple and understandable as for me.

Suggestions:) How about:
https://www.facebook.com/watirhome

On Feb 25, 3:11 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, Feb 22, 2011 at 4:02 PM, Željko Filipin 
 zeljko.fili...@wa-research.ch wrote:
  I did not find a way how to create simple URL like

 https://www.facebook.com/pages/Watiror evenhttps://www.facebook.com/Watir,
 if somebody knows how to do it, please let me know.

 Found how to do it (athttps://www.facebook.com/username/). Looks like the
 page had to have certain number of likes. (By the way, likes stopped at
 30, feel free to like it.)

 Once we set the page name, we can not change it.

 https://www.facebook.com/watiris taken.

 watir.com is not available, I guess you can not have dot (.) in the url.

 wtr is too short, it insists on 5 characters.

 watirdotcom, watircom, watirproject are available.

 What do you think? Any other suggestions?

 Ž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: Error on re-executing the script

2011-02-25 Thread Dave McNulla
Ashu,

Sorry, but I have no idea what happened from your message. Try to treat this 
like a defect that you are submitting to a tracking system: how to 
reproduce, happened/expected, configuration info (versions of ruby, watir, 
FireFox, etc.), what problem you are trying to solve with the automation.

Good luck,

Dave

-- 
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


Re: [wtr-general] Re: Watir at Facebook

2011-02-25 Thread Ethan
ruby-watir, or watir-ruby, perhaps?

On Fri, Feb 25, 2011 at 10:19, sdemian sergeydemjanc...@gmail.com wrote:

 I like watircom - very simple and understandable as for me.

 Suggestions:) How about:
 https://www.facebook.com/watirhome

 On Feb 25, 3:11 pm, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:
  On Tue, Feb 22, 2011 at 4:02 PM, Željko Filipin 
 zeljko.fili...@wa-research.ch wrote:
   I did not find a way how to create simple URL like
 
  https://www.facebook.com/pages/Watiror evenhttps://
 www.facebook.com/Watir,
  if somebody knows how to do it, please let me know.
 
  Found how to do it (athttps://www.facebook.com/username/). Looks like
 the
  page had to have certain number of likes. (By the way, likes stopped
 at
  30, feel free to like it.)
 
  Once we set the page name, we can not change it.
 
  https://www.facebook.com/watiris taken.
 
  watir.com is not available, I guess you can not have dot (.) in the url.
 
  wtr is too short, it insists on 5 characters.
 
  watirdotcom, watircom, watirproject are available.
 
  What do you think? Any other suggestions?
 
  Ž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


-- 
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


Re: [wtr-general] Re: Watir at Facebook

2011-02-25 Thread Željko Filipin
On Fri, Feb 25, 2011 at 6:40 PM, Ethan notet...@gmail.com wrote:
 ruby-watir, or watir-ruby, perhaps?

Tried and got: Usernames can only contain A-Z, a-z, 0-9, and periods (.)

ruby.watir and watir.ruby are valid and available.

Ž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


Re: [wtr-general] unknown property or method document HRESULT error 0x800706b5

2011-02-25 Thread Tim Koopmans
Run watir from a shell with admin privs.

http://jira.openqa.org/browse/WTR-427


Cheers,
Tim



On Fri, Feb 25, 2011 at 11:55 PM, TCBlues tcbl...@gmail.com wrote:
 Watir: 1.6.5
 Windows 7 64 bits
 Ruby 1.8.7

 When running this code:

 require 'watir'
 nav=Watir::IE.new()
 nav.goto(http://www.google.com;)
 puts nav.url
 nav.close()


 I get this error:
 unknown property or method `document'    HRESULT error code:
 0x800706b5      The interface is unknown.

 I was surfing the internet but nothing is working in my case

 --
 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


-- 
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


Re: [wtr-general] unknown property or method document HRESULT error 0x800706b5

2011-02-25 Thread Dmitriy Korobskiy
Just FYI: it does not seem to be happening on a 32-bit Vista. I run 
Watir there using a non-admin account.


--
DK
AIM: DKroot1, Skype: DKroot


On 2/25/11 12:50 PM, Tim Koopmans wrote:

Run watir from a shell with admin privs.

http://jira.openqa.org/browse/WTR-427


Cheers,
Tim



On Fri, Feb 25, 2011 at 11:55 PM, TCBluestcbl...@gmail.com  wrote:

Watir: 1.6.5
Windows 7 64 bits
Ruby 1.8.7

When running this code:

require 'watir'
nav=Watir::IE.new()
nav.goto(http://www.google.com;)
puts nav.url
nav.close()


I get this error:
unknown property or method `document'HRESULT error code:
0x800706b5  The interface is unknown.

I was surfing the internet but nothing is working in my case

--
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



--
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] Update on Watir Day 2011 - Sunday 3rd April - San Francisco

2011-02-25 Thread Alister Scott
Hi Everyone,

I thought I would send out an update on Watir Day 2011, in case you hadn't
seen what's happening on the website and twitter.
http://watir.com/watir-day/

Planning for Watir Day is full steam ahead.

*Proposing a Talk*

You can propose a talk which closes over the coming days. See:
http://watir.com/watir-day/propose-a-talk/

*Tickets
*
Tickets are $50 each and on sale now. You can get a free ticket if you're
coming from overseas, and / or presenting at the Watir Day. Also, you don't
need to be attending Selenium Conference to buy a ticket. Oh, and you get a
special Watir Day T-Shirt.
Link to tickets page: http://watirday.eventbrite.com/

*Sponsorship
*
The thing I am most excited about is our sponsorship packages. For only
$175, your employer or company can sponsor the day and get four included
tickets free, valued at $200. This should make it easy to convince your
employer to sponsor the day and send some people!
http://watir.com/watir-day/sponsorship/
*
Coming Up Next*

Over the coming days/weeks, we plan to finalize the program including the
speakers, and open space format: so stay tuned.


If you have any further questions, please feel to contact me, and please
spread the word!


Thanks,

Alister Scott
Brisbane, Australia
Watir Web Master: http://watir.com
Blog: http://watirmelon.com
LinkedIn: http://www.linkedin.com/in/alisterscott

There are two ways to get enough: One is to continue to accumulate more and
more. The other is to desire less. *~ G. K. Chesterton*

-- 
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] Prerelease version of Watir out 1.8.0.rc1

2011-02-25 Thread Charley Baker
Hello all,

  I've pushed a release candidate for the next version of watir and
firewatir into the pipeline. Feel free to test it out and submit any
challenges you might have. The biggest change for this release is
dropping the ActiveSupport library for Firefox. Major kudos to Jarmo
for pushing that out.

The full Changelog is available at
http://github.com/bret/watir/blob/master/CHANGES

Make sure your local gem system is up to date.

gem update --system

Depending on what you're using, either watir or firewatir:

gem install (fire)watir --pre

Note: If you're installing on Mac or Linux you'll want to use
firewatir for the gem install.

...and give it a go. Try to use it with your existing test suites and
so on to see if there are any issues.

If there are any problems then:
1) Fix it and send a pull request on Github, our main github repo:
http://github.com/bret/watir
 This is the preferred way of accepting patches, we're happy to work
with you on how to do this, github also has extensive docs on how to
fork and submit a pull request.
2) Add it to our JIRA tracker: http://jira.openqa.org/browse/WTR

If you need help with that let us know.

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: Prerelease version of Watir out 1.8.0.rc1

2011-02-25 Thread Jarmo Pertman
I'm not sure how to communicate the removal of active support
dependency properly because there will be probably failing tests due
to the usages of active support without users even acknowledging it.
I'm pretty sure there are tests with something like 2.days.from_now
and so on. Any ideas? Or will the CHANGES and this mail be good
enough?

Jarmo

On Feb 26, 2:02 am, Charley Baker charley.ba...@gmail.com wrote:
 Hello all,

   I've pushed a release candidate for the next version of watir and
 firewatir into the pipeline. Feel free to test it out and submit any
 challenges you might have. The biggest change for this release is
 dropping the ActiveSupport library for Firefox. Major kudos to Jarmo
 for pushing that out.

 The full Changelog is available 
 athttp://github.com/bret/watir/blob/master/CHANGES

 Make sure your local gem system is up to date.

 gem update --system

 Depending on what you're using, either watir or firewatir:

 gem install (fire)watir --pre

 Note: If you're installing on Mac or Linux you'll want to use
 firewatir for the gem install.

 ...and give it a go. Try to use it with your existing test suites and
 so on to see if there are any issues.

 If there are any problems then:
 1) Fix it and send a pull request on Github, our main github 
 repo:http://github.com/bret/watir
  This is the preferred way of accepting patches, we're happy to work
 with you on how to do this, github also has extensive docs on how to
 fork and submit a pull request.
 2) Add it to our JIRA tracker:http://jira.openqa.org/browse/WTR

 If you need help with that let us know.

 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