Re: [wtr-general] Re: Jssh for Firefox 4.0 beta3

2010-09-01 Thread Željko Filipin
Hi,

Comments are inline.

On Tue, Aug 31, 2010 at 6:05 PM, Super Kevy 
wrote:
>   -  Error: Failed to build gem native extension

Do you have devkit installed? I am not sure it is supported on windows 2000.

> 4. Install the webdriver
> 5. Test it: in firefox -- works
> 6. Test it in IE6 - Fail
> 7.  Test in FF round 2 - Pass
> 8.  Test in IE6 round 2 - Pass

So, webdriver gem can drive firefox but not IE, and watir/firewatir gem can
drive both firefox and IE?

Željko

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


Re: [wtr-general] couple of backtraces

2010-09-01 Thread Željko Filipin
Please create tickets for these in Jira:

http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowtocreateaJiraTicket%3F

Željko
--
watir.com - community manager
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them
vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

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


Re: [wtr-general] Unable to click on a radio button

2010-09-01 Thread Željko Filipin
On Wed, Sep 1, 2010 at 8:22 AM, Ashok Prabhu  wrote:
> However I m unable to
> click on it using the udefDisplayViewName attribute.

And the error message is?

Željko
--
watir.com - community manager
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them
vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

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


Re: [wtr-general] Unable to click on a radio button

2010-09-01 Thread Sharma Vishav
I am not sure if udefDisplayViewName is an standard html attribute and
is supported by watir.
is this code auto generated through some tool ?



On Wed, Sep 1, 2010 at 6:22 PM, Ashok Prabhu  wrote:
> I have a radio button with the following attributes. I m able to click
> on the radio button using the id attribute. However I m unable to
> click on it using the udefDisplayViewName attribute.
>
> 
>
> This is the watir code that is trying to click on it using the
> udefDisplayViewName.
>
> ie.modal_dialog.table(:index,1).cell(:index,
> 5).radio(:udefDisplayViewName, "Data").click
>
> Please help me out.
>
> 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
>

-- 
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 on a radio button

2010-09-01 Thread Ashok Prabhu
The script does not show any error. It hangs at the step trying to
click on the radio button. Later it times out after sometime due to a
condition in our script.

On Sep 1, 12:21 pm, Željko Filipin 
wrote:
> On Wed, Sep 1, 2010 at 8:22 AM, Ashok Prabhu  wrote:
> > However I m unable to
> > click on it using the udefDisplayViewName attribute.
>
> And the error message is?
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
> vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

-- 
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 on a radio button

2010-09-01 Thread Ashok Prabhu
Yes, it is generated by a tool. I did not manually code the radio
button with the attribute.

~Ashok.

On Sep 1, 12:28 pm, Sharma Vishav  wrote:
> I am not sure if udefDisplayViewName is an standard html attribute and
> is supported by watir.
> is this code auto generated through some tool ?
>
> On Wed, Sep 1, 2010 at 6:22 PM, Ashok Prabhu  wrote:
> > I have a radio button with the following attributes. I m able to click
> > on the radio button using the id attribute. However I m unable to
> > click on it using the udefDisplayViewName attribute.
>
> > 
>
> > This is the watir code that is trying to click on it using the
> > udefDisplayViewName.
>
> > ie.modal_dialog.table(:index,1).cell(:index,
> > 5).radio(:udefDisplayViewName, "Data").click
>
> > Please help me out.
>
> > Thanks,
> > ~Ashok.
>
> > --
> > 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


Re: [wtr-general] Unable to click on a radio button

2010-09-01 Thread Željko Filipin
On Wed, Sep 1, 2010 at 8:22 AM, Ashok Prabhu  wrote:
> ie.modal_dialog.table(:index,1).cell(:index,
5).radio(:udefDisplayViewName, "Data").click

This page links to a few pages that say how Watir API works:

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

These pages will tell you that you can not use udefDisplayViewName to access
an element:

http://wiki.openqa.org/display/WTR/How+and+What
http://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir
http://wiki.openqa.org/display/WTR/Ways+Available+To+Identify+HTML+Element

But, of course there is a way:

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

Let us  know if you need further help.

Željko

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


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

2010-09-01 Thread Željko Filipin
http://stackoverflow.com/questions/3614865/firewatir-firewatir-returns-undefined-method-error-in-eclipse
http://stackoverflow.com/questions/3608515/jssh-telnet-fails-even-after-installing-the-add-on-on-linux

-- 
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: Jssh for Firefox 4.0 beta3

2010-09-01 Thread Super Kevy
> So, webdriver gem can drive firefox but not IE, and watir/firewatir gem can
> drive both firefox and IE?
>
> Željko

Yes that is correct.

Webkit requirements says XP OS, but I went ahead and did fresh
installs of ruby/watir/webdriver and devkit in the W2k system and
retested. Here's a thread showing the devkit install and
subsequent launch of ie6 using watir-webdriver.

DEVKIT INSTALL version DevKit-4.5.0-20100819-1536-sfx.exe
--
C:\>cd devkit

C:\devkit>dir/w
 Volume in drive C has no label.
 Volume Serial Number is B89D-5592

 Directory of C:\devkit

[.]  [..] [bin]devkitvars.bat
dk.rb[etc][include][lib]
m.ico[mingw]  msys.bat msys.ico
perllocal.pod[postinstall][sbin]   [share]
   6 File(s) 58,004 bytes
  10 Dir(s)   7,695,446,016 bytes free

C:\devkit>ruby dk.rb

Configures an MSYS/MinGW based Development Kit (DevKit) for
each of the Ruby installations on your Windows system. The
DevKit enables you to build many of the available native
C-based RubyGems that don't yet have a binary gem.

Usage: ruby dk.rb COMMAND

where COMMAND is one of:

  init prepare DevKit for installation
  review   review DevKit install plan
  install  install required DevKit executables


C:\devkit>ruby dk.rb init
[INFO] found RubyInstaller v1.8.7 at C:/Ruby

Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.

C:\devkit>ruby dk.rb review
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.

C:/Ruby

C:\devkit>ruby dk.rb install
[INFO] Installing C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/defaults/
operating_sys
tem.rb
[INFO] Installing C:/Ruby/lib/ruby/site_ruby/devkit.rb

C:\devkit>gem install rdiscount --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed rdiscount-1.6.5
1 gem installed
Installing ri documentation for rdiscount-1.6.5...
Installing RDoc documentation for rdiscount-1.6.5...

C:\devkit>ruby -rubygems -e "require 'rdiscount'; puts
RDiscount.new('**Hello Ru
byInstaller**').to_html"
Hello RubyInstaller

C:\devkit>dir *.bat
 Volume in drive C has no label.
 Volume Serial Number is B89D-5592

 Directory of C:\devkit

08/19/2010  02:36p 288 devkitvars.bat
11/22/2009  04:13p   7,250 msys.bat
   2 File(s)  7,538 bytes
   0 Dir(s)   7,694,725,120 bytes free

C:\devkit>devkitvars.bat
Adding the DevKit to PATH...

C:\devkit>path
PATH=C:\devkit\bin;C:\devkit\mingw\bin;C:\Ruby\bin;C:\WINNT\system32;C:
\WINNT;C:
\WINNT\System32\Wbem

C:\devkit>


WATIR-WEBDRIVER  TEST
--
1. FireFox - WORKS
require "rubygems"
require "watir-webdriver"
browser = Watir::Browser.new(:firefox)
browser.goto('http://www.google.com')
sleep 3
browser.close

2. IE6 - FAILS
require "rubygems"
require "watir-webdriver"
browser = Watir::Browser.new(:ie)
browser.goto('http://www.google.com')
sleep 3
browser.close


IE6 Popup
ruby.exe - Entry Point Not Found
The procedure entry point GetModuleHandleExW could not be located in
dynamic link library KERNEL32.dll

C:/Ruby/lib/ruby/gems/1.8/gems/ffi-0.6.3-x86-mingw32/lib/ffi/
library.rb:61:in `ffi_lib': Could not open library 'C:/Ruby/lib/ruby/
gems/1.8/gems/selenium-webdriver-0.0.28/lib/selenium/webdriver/ie/
native/win32/InternetExplorerDriver.dll': The specified procedure
could not be found.
 (LoadError)
from C:/Ruby/lib/ruby/gems/1.8/gems/ffi-0.6.3-x86-mingw32/lib/ffi/
library.rb:43:in `map'
from C:/Ruby/lib/ruby/gems/1.8/gems/ffi-0.6.3-x86-mingw32/lib/ffi/
library.rb:43:in `ffi_lib'
from C:/Ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-0.0.28/lib/
selenium/webdriver/ie/lib.rb:15
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from C:/Ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-0.0.28/lib/
selenium/webdriver/ie.rb:16
from C:/Ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-0.0.28/lib/
selenium/webdriver/driver.rb:40:in `for'
from C:/Ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-0.0.28/lib/
selenium/webdriver.rb:73:in `for'
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-webdriver-0.0.8/lib/watir-
webdriver/browser.rb:34:in `initialize'
from klp2.rb:5:in `new'
from klp2.rb:5
>Exit code: 1

3. Considering the ancient OS its understandable.   I dont recall if
selenium every supported W2K.

- Best Regards :)





--

[wtr-general] new window automation library: WinWindow

2010-09-01 Thread Ethan
I've released a gem for a ruby library that I hope people will find useful,
and I believe will be of interest to those using watir. The library is
called WinWindow, and its aim is to represent a window (such as an IE
window, or a javascript popup), and expose windows API methods in an
object-oriented, ruby-like way.

The project's site is at http://winwindow.vapir.org/

It was borne of frustration with winClicker and AutoIt, and I wrote it to
replace, improve, and expand on functionality that watir currently uses
those libraries for. Namely, interaction with modal dialogs (getting text,
entering text, clicking buttons, closing); maximizing/focusing windows;
dealing with File Upload dialogs. It also does screen captures, which I
implemented because the win32screenshot gem was broken, although Jarmo has
since fixed that gem.

Some sample code showing use with watir, to close a javascript popup,
follows:

$ irb -r watir
>> require 'winwindow'
=> true
# launch a new browser
>> ie=Watir::IE.new
=> #
# create a WinWindow representing the browser
>> w=WinWindow.new(ie.hwnd)
=> #
# go to a site that'll give us a javascript popup
>> ie.goto "http://www.mediacollege.com/internet/javascript/basic/alert.html
"
=> 2.953125
# click the button to create the popup
>> ie.button(:value, /alert/).click_no_wait
=> ""
# see if the popup is on the window
>> w.enabled_popup
=> #
# click the "OK" button on the popup. the 'try_for' part tells it how many
# seconds to try, because sending click messages through the windows API is
# not very reliable and just doing it once tends to fail.
>> w.enabled_popup.click_child_button_try_for!('OK', 4)
=> true
# popup is gone.

tl;dr version: to click on a button on ie's popup with text button_text
(trying for n seconds), you can use

WinWindow.new(ie.hwnd).enabled_popup.click_child_button_try_for!(button_text,
n)


I hope you'll give it a try and let me know what you think.

-Ethan

-- 
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 on a radio button

2010-09-01 Thread Chuck van der Linden
Can you give us the full HTML for the radio button? (there's no value
or text defined in what you presented, so really unless there's
clientside scripting involved, that button could not 'work'

If operating the thing manually, how do you know what radio button to
pick? is there text or something else associated with it that could be
used to identify the button?

 If you can identify by ID, why not use that?

On Sep 1, 12:38 am, Ashok Prabhu  wrote:
> Yes, it is generated by a tool. I did not manually code the radio
> button with the attribute.
>
> ~Ashok.
>
> On Sep 1, 12:28 pm, Sharma Vishav  wrote:
>
>
>
> > I am not sure if udefDisplayViewName is an standard html attribute and
> > is supported by watir.
> > is this code auto generated through some tool ?
>
> > On Wed, Sep 1, 2010 at 6:22 PM, Ashok Prabhu  wrote:
> > > I have a radio button with the following attributes. I m able to click
> > > on the radio button using the id attribute. However I m unable to
> > > click on it using the udefDisplayViewName attribute.
>
> > > 
>
> > > This is the watir code that is trying to click on it using the
> > > udefDisplayViewName.
>
> > > ie.modal_dialog.table(:index,1).cell(:index,
> > > 5).radio(:udefDisplayViewName, "Data").click
>
> > > Please help me out.
>
> > > Thanks,
> > > ~Ashok.
>
> > > --
> > > 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: How to check if a div is present or not?

2010-09-01 Thread Chuck van der Linden
Agreed, you should only use assert if you want to have the test fail
if the assert condition is not true. (and in that case why rescue
it?)

Otherwise if you want the code to do something different in that
instance, use an if statement as Z gave in his response below

On Aug 31, 2:03 am, Željko Filipin 
wrote:
> On Tue, Aug 31, 2010 at 10:54 AM, ambarw  wrote:
> > begin
> > assert(browser.div(:id, "LObjExist").exists?)
> > rescue
>
> I am completely lost in your code. Why do you rescue exception thrown by
> assert?
>
> This is no good for you?
>
> if browser.div(:id, "LObjExist").exists?
>   # do something
> else
>   # do something else
> end
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
> vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

-- 
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] Automated saving/capturing page DOM

2010-09-01 Thread James Wilson
I have read about various ways to automate screenshots in Watir
workflows, but is there a way to get a "DOM shot" that captures the
HTML, CSS, and JS to disk so it can be re-rendered at a later point?
The disadvantage of the screenshot is that it is limited to actual
window size in the display. Firefox can do save the DOM by File > Save
Page As, and while the page's HTML is available from the browser
object, that doesn't include the CSS and JS.

James

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


Re: [wtr-general] couple of backtraces

2010-09-01 Thread Charley Baker
Yep, create a ticket and I'll look at it. Some of that appears to be
due to activesupport dependencies which I'll also look at, in
reference to some of the other recent issues. We have a lot of open
issues currently which I'm working on prioritizing and organizing. My
windows VM has been barely usable, so I need to figure that out to
make quicker progress. I appreciate the help with the trace. :)

Cheers,


Charley Baker
Lead Developer, Watir, http://watir.com



On Wed, Sep 1, 2010 at 1:18 AM, Željko Filipin
 wrote:
> Please create tickets for these in Jira:
>
> http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowtocreateaJiraTicket%3F
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
> vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi
>
> --
> 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
>

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