[Wtr-general] Control windows dialog box

2007-03-21 Thread sathees
How to access the windows dialog box. I am tring to save a image. Save picture 
dialog box appears. How to click save or cancel button in that dialog box?

any help appreciated!
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Access Denied error re-occurred in 1158build

2007-03-21 Thread kikiki
irb(main):001:0 require 'watir'
irb(main):002:0 ie=Watir::IE.new
irb(main):003:0 ie.goto(http://cnn.com;)
WIN32OLERuntimeError: document
OLE error code:80070005 in Unknown
  #50529;#49464;#49828;#44032; 
#44144;#48512;#46104;#50632;#49845;#45768;#45796;.

HRESULT error code:0x80020009
  #50696;#50808;#44032; #48156;#49373;#54664;#49845;#45768;#45796;.
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in 
`method_missing
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in 
`wait'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1829:in 
`times'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1829:in 
`wait'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1693:in 
`goto'
from (irb):3
irb(main):004:0

in this case, I fixed this problem by 

ie.disable_checker(Watir::NAVIGATION_CHECKER) 

but in the 1158 version, I can't do that. 
( I searched the code and I do below

require 'watir/contrib/page_checker' 
ie.disable_checker(PageCheckers::NAVIGATION_CHECKER)

but it isn't solved )

How can I solve this problem?

Thank you.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How can I click this element-- arghh!

2007-03-21 Thread Željko Filipin

On 3/21/07, Brian Mintun [EMAIL PROTECTED] wrote:


but the click never happens



What happens? What did you expect to happen? Any error messages?

Thre are two div tags and one img tag in html that you sent. Does any of
this do what you want?

ie.div(:id, newMessageButton).click # click the first div
ie.image(:alt, New).click # click the image
ie.div(:text, New).click # click the second div
--
ZeljkoFilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Watir Recorder

2007-03-21 Thread Naga Harish Kanegolla
HI,
 Is Watir Recorder launched?? If so where can I get the installer??
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir Recorder

2007-03-21 Thread Željko Filipin

http://www.openqa.org/watir-recorder/
--
ZeljkoFilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Watir Recorder

2007-03-21 Thread Naga Harish Kanegolla
I tried to download the installer from this link 
http://www.openqa.org/watir-recorder/download.action  but its a blank page and 
no installer is being downloaded. is there anything else??
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir Recorder

2007-03-21 Thread Željko Filipin

Try posting a question at watir recorder forum (
http://forums.openqa.org/forum.jspa?forumID=37). As far as I know, watir
recorder is not supported at this list.
--
ZeljkoFilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] watir faqs

2007-03-21 Thread aidy lewis
Hi,

I have been out of the loop for about 5 months. Could anyone tell me
if there is still a Watir FAQ Wiki?

aidy
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] watir faqs

2007-03-21 Thread Željko Filipin

http://wiki.openqa.org/display/WTR/FAQ
--
ZeljkoFilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] watir faqs

2007-03-21 Thread Adam Reed
http://wiki.openqa.org/display/WTR/FAQ ?

That's the first hit google gives me -- is that what you were looking
for?

Adam 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of aidy lewis
Sent: Wednesday, March 21, 2007 3:11 PM
To: Wtr-general@rubyforge.org
Subject: [Wtr-general] watir faqs

Hi,

I have been out of the loop for about 5 months. Could anyone tell me if
there is still a Watir FAQ Wiki?

aidy
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] call a method

2007-03-21 Thread Charley Baker

Hi Chitta,

 I'm not quite sure what you're trying to do here, but it looks like your
checkcondition method is in the test case. And you're calling, based on this
code, your checkcondition method inside itself. It's a bit hard to even know
where to begin with this. Some more context might help, or maybe someone
else on the list wants to do more parsing of the code and work through it.

There's an excel interface class which I haven't used, but might help
simplify some of what you're doing here:
http://wiki.openqa.org/display/WTR/Excel+interface+class

Quick guesswork and of dubious value...

class TC_1  Test::Unit::TestCase
 def  test_sign_up
   # figure out what values you need here to call this method with all it's
parameters which are quite a few
checkcondition(checktext, cell1, cell2, messagepass, messagefail,
passcheck, failcheck)
 end
end

checkcondition being a method in another class or module, which it may be
already.

-Charley


On 3/20/07, chitta [EMAIL PROTECTED] wrote:


 Hi All,

Please Help me how can i declare a method here..



# Test to automate Sign-up
# Author : Chitta Ranjan
# Verson : 0.2

require 'watir'
require 'test/unit'

#Test Suite for Sign up verifications
class TC_1  Test::Unit::TestCase
def  test_sign_up
def checkcondition(checktext, cell1, cell2, messagepass, messagefail,
passcheck, failcheck)
if ie.contains_text(#{checktext})
p 'messagepass'
excel.Range(#{cell1})['Value'] = #{passcheck};
excel.Range(#{cell2})['Value'] = #{pass};
else
p 'messagefail'
excel.Range(#{cell1})['Value'] = #{failcheck};
excel.Range(#{cell2})['Value'] = #{fail};
end











  require 'win32ole'
  excel = WIN32OLE.new(excel.application)
  # Workbook holding the test data and test case
  workbook = excel.Workbooks.Open('C:\SetupData.xls')
  # Refernce to Test Data in the worksheet
  worksheet = workbook.Worksheets('Test Data')
  #Variable for handling null
  nullvariable = worksheet.Range('b1')['Value']
  # First Name
  firstname   = worksheet.Range('b2')['Value']
  # Last Name
  lastname   = worksheet.Range('b3')['Value']
  # Correct Email Address
  email1 = worksheet.Range('b4')['Value']
  #Invalid Email Address
  email2 = worksheet.Range('c4')['Value']
  # Correct Password
  password1   = worksheet.Range('b5')['Value']
  # Incorrect Password- invalid length
  password2   = worksheet.Range('c5')['Value']
  # Incorrect Password - invalid length
  password3   = worksheet.Range('d5')['Value']
  # Incorrect Password - invalid length
  password4   = worksheet.Range('e5')['Value']
  # Password Reminder - Correct
  passwordreminder1 = worksheet.Range('b6')['Value']
  # Password Reminder - Incorrect
  passwordreminder2 = worksheet.Range('c6')['Value']
  # Answer to password reminder
  answer = worksheet.Range(B#{1 + 6})['Text'].strip.to_s
  # Contact Phone number
  contactphonenumber1 = worksheet.Range(B#{1 + 7})['Text'].strip.to_s
  # Invalid Contact Phone Number - Invalid length
  contactphonenumber2 = worksheet.Range(C#{1 + 7})['Text'].strip.to_s
  # Invalid Contact Phone Number - Invalid length
  contactphonenumber3 = worksheet.Range('d8')['Value']
  # Internet Provider
  internetprovider = worksheet.Range('b9')['Value']
  # Street Number
  streetno = worksheet.Range(B#{1 + 9})['Text'].strip.to_s
  # Street Name
  streetname = worksheet.Range('b11')['Value']
  # City
  city = worksheet.Range('b12')['Value']
  # Valid State
  state1 = worksheet.Range('b13')['Value']
  # Invalid State - No Selection
  state2 = worksheet.Range('c13')['Value']
  # Zip Code
  zipcode1 = worksheet.Range(B#{1 + 13})['Text'].strip.to_s
  # Invalid Zip Code
  zipcode2 = worksheet.Range(C#{1 + 13})['Text'].strip.to_s
  # Invalid Zip Code
  zipcode3 = worksheet.Range(D#{1 + 13})['Text'].strip.to_s
  # Invalid Zip Code
  zipcode4 = worksheet.Range(E#{1 + 13})['Text'].strip.to_s
  #valid NPA
  npa = worksheet.Range(B#{1 + 14})['Text'].strip.to_s
  #Valid NXX
  nxx = worksheet.Range(B#{1 + 15})['Text'].strip.to_s
  #Valid Creditcard Name
  cardname = worksheet.Range('b17')['Value']
  #Credit Card Type
  cardtype1 = worksheet.Range('b18')['Value']
  #Credit Card Type
  cardtype2 = worksheet.Range('c18')['Value']
  #Invalid Credit Card Number
  creditcardnumber = worksheet.Range('b19')['Value']
  #Credit Card security code
  securitycode1 = worksheet.Range(B#{1 + 19})['Text'].strip.to_s
  #invalid Security code
  securitycode2 = worksheet.Range(C#{1 + 19})['Text'].strip.to_s
  #invalid Security code
  securitycode3 = worksheet.Range(D#{1 + 19})['Text'].strip.to_s
  #invalid Security code
  securitycode4 = worksheet.Range(E#{1 + 19})['Text'].strip.to_s
  #Credit Card exp. Month
  expirationmonth = worksheet.Range(B#{1 + 20})['Text'].strip.to_s
  #Credit Card exp. year
  expirationyear1 = worksheet.Range(B#{1 + 21})['Text'].strip.to_s
  #Credit Card exp. year invalid
  expirationyear2 = worksheet.Range(C#{1 + 21})['Text'].strip.to_s
  #Test result If Passd
  pass = worksheet.Range('b24')['Value']
  #Test result 

[Wtr-general] How to access browser authentication pop-up

2007-03-21 Thread Oscar
Hello, thanks in advance for any help you can give me. 

I'm trying to begin writing a test for an internal app. The website uses simple 
Apache Browser authentication so it pops up with a Windows-looking 
authentication window. 

I've searched high and low for help on this but I can't find how to interact 
with this so I thought I'd ask here. 

I've searched for: windows security browser authentication login logon 
login pop up default browser pop up and a bunch of other terms. I can't 
find anything related... google, or here. 

How do I go about entering a username and password on this? I tried using irb 
to and all_objects to see if i could find anything but the moment I go to the 
site, irb will be just waiting for the page to finish loading so I can't even 
query it to see what is available to me.

Any ideas?  Here's a screenshot of the window I get just so you see exactly 
what I'm talking about.
http://www.flickr.com/photos/[EMAIL PROTECTED]/429653070/
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] watir faqs

2007-03-21 Thread aidy lewis
 http://wiki.openqa.org/display/WTR/FAQ ?

Is this a deprecated site then

http://wtr.rubyforge.org/  ?

with a faq url of:

http://wtr.rubyforge.org/wiki/wiki.pl?

cheers

aidy
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] watir faqs

2007-03-21 Thread carl . l . shaulis




Hello,

My understanding is that Rubyforge site is not deprecated.  The site
wtr.rubyforge.org is the main release site for WATIR, which is the current
home to WATIR 1.4  When WATIR 1.5 goes live the release code and
supporting documentation will be placed here.

The openqa site is intended to be the development site.  This site allows
teams to use the latest WATIR methods, documentation, submit defects, vote
on features etc...; however, I believe at this point this is not considered
a stable release candidate.

I hope this helps.  If I am wrong I am sure Charlie and Bret will quickly
correct these statements.  :0)

Carl




   
 aidy lewis  
 [EMAIL PROTECTED] 
 email.com To 
 Sent by:  wtr-general@rubyforge.org   
 wtr-general-bounc  cc 
 [EMAIL PROTECTED]  
   Subject 
   Re: [Wtr-general] watir faqs
 03/21/2007 04:18  
 PM
   
   
 Please respond to 
 [EMAIL PROTECTED] 
 orge.org  
   
   




 http://wiki.openqa.org/display/WTR/FAQ ?

Is this a deprecated site then

http://wtr.rubyforge.org/  ?

with a faq url of:

http://wtr.rubyforge.org/wiki/wiki.pl?

cheers

aidy
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How to access browser authentication pop-up

2007-03-21 Thread Ethan Jewett
Oscar,

In my experience, the easiest thing to do is to hack up your goto
method to allow for an option that doesn't wait for the page to load
before passing back control to your script.  Then, assuming you can
get your username and password saved in your browser, you can just use
AutoIT to send an Enter keystroke to clear the dialog with a
successful login.

There's a patch (the larger) attached to this issue that contains such
a code change and allows you to use the syntax below for the goto
method: http://jira.openqa.org/browse/WTR-146

NOTE: This will not work without aforementioned patch!

  @application_base = http://yoursite.com;
  $ie.goto(@application_base, :wait = false)
  sleep 7
  @autoit = WIN32OLE.new('AutoItX3.Control')
  @autoit.Send {ENTER}
  @autoit = nil
  sleep 5

Once you get that working, you could experiment with using AutoIT or
the WinClicker that comes with Watir (I've never really been able to
get this to work, but YMMV) to populate usernames and passwords in the
dialog.  Maybe someone else can give an example . . .

Ethan

On 3/21/07, Oscar [EMAIL PROTECTED] wrote:
 Hello, thanks in advance for any help you can give me.

 I'm trying to begin writing a test for an internal app. The website uses 
 simple Apache Browser authentication so it pops up with a Windows-looking 
 authentication window.

 I've searched high and low for help on this but I can't find how to interact 
 with this so I thought I'd ask here.

 I've searched for: windows security browser authentication login 
 logon login pop up default browser pop up and a bunch of other terms. I 
 can't find anything related... google, or here.

 How do I go about entering a username and password on this? I tried using irb 
 to and all_objects to see if i could find anything but the moment I go to the 
 site, irb will be just waiting for the page to finish loading so I can't even 
 query it to see what is available to me.

 Any ideas?  Here's a screenshot of the window I get just so you see exactly 
 what I'm talking about.
 http://www.flickr.com/photos/[EMAIL PROTECTED]/429653070/
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Call A Method

2007-03-21 Thread chitta
HI,
 
In my script i used 
 
if ie.contains_text(Choose Plan)
  p 'Choose plan page is opening pass'
  excel.Range(d3)['Value'] = urlverificationactualpass;
  excel.Range(e3)['Value'] = pass;
else
  p 'Choose plan page is not opening fail'
  excel.Range(d3)['Value'] = urlverificationactualfail;
  excel.Range(e3)['Value'] = fail;
  
end
 
 
 
in all my 51 test cases, where the   urlverificationactualpass,
urlverificationactualfail, pass, fail all are the veriables  used to read a
perticular cell from one excell sheet, and write it to another excell sheet
depending upon the test pass or fail.
 
Now i want to write a method for this so that i don't need to write it again
 again, only i have to call the method ...is this possible??
 
 
def checkcondition(checktext, cell1, cell2, messagepass, messagefail,
passcheck, failcheck,excel)
if ie.contains_text(#{checktext})
p 'messagepass'
excel.Range(#{cell1})['Value'] = #{passcheck};
excel.Range(#{cell2})['Value'] = #{pass};
else
p 'messagefail'
excel.Range(#{cell1})['Value'] = #{failcheck};
excel.Range(#{cell2})['Value'] = #{fail};
end
end
 
checkcondition(Choose Plan, d3, e3, Choose plan page is opening
pass, Choose plan page is not opening fail, urlverificationactualpass,
urlverificationactualfail)
 
 
Any Body can help me
 
Regards
 
Chitta Ranjan
 
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general