[wtr-general] Re: how to click link with CTRL key pressed in watir?

2009-08-18 Thread ashokmpm password

Hi Dylan

Thanks for your reply.

But still im stucked.

I have to send CTRL key event and at the same time click the link , so that 
link is opened which is blocked.

so how can i do this?

Actually im clicking link as --

$ie.link(:href, javascript:openSearchWindow()).click

But this click i have to do with CTRL key pressed.SEND({LCTRL})

Can you help me on this.

Bhavesh



- Original Message 
From: Dylan mej...@gmail.com
To: Watir General watir-general@googlegroups.com
Sent: Monday, August 17, 2009 9:15:02 PM
Subject: [wtr-general] Re: how to click link with CTRL key pressed in watir?


http://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000256

-Dylan

On Aug 16, 11:32 pm, Bhavesh bhavesh1_sha...@yahoo.com wrote:
 Actually  currently i press CTRL key manually and then the link, it
 gets opened.

 But while automating how can i do this?

 Plz dont suggest to remove pop-blocker as i have already done whatever
 i can, now i have soem restriction from my office side.

 So i need to send CTRL+link click.

 Can anybody help me in this regard.

 Bhavesh


  

--~--~-~--~~~---~--~~
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 do I get a URL parameter value

2009-08-18 Thread Marlon

Im getting an error retrieving src value which is https://url.com/
text.asp?p=xyzq=abc using attribute_value()

code: $ie.frame(:index, 1).attribute_value(src)

Error:
NoMethodError: undefined method `attribute_value' for #Watir::Frame:
0xfdbec50


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: How do I get a URL parameter value

2009-08-18 Thread Raveendran P
Hi,

Are tried like this ?

@frame_src=$ie.frame(:index, 1).html




On Tue, Aug 18, 2009 at 11:39 AM, Marlon marlonmoja...@gmail.com wrote:


 Im getting an error retrieving src value which is https://url.com/
 text.asp?p=xyzq=abc https://url.com/%0Atext.asp?p=xyzq=abc using
 attribute_value()

 code: $ie.frame(:index, 1).attribute_value(src)

 Error:
 NoMethodError: undefined method `attribute_value' for #Watir::Frame:
 0xfdbec50


 thanks





 



-- 
Regards,
P.Raveendran
http://raveendran.wordpress.com

--~--~-~--~~~---~--~~
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 do I get a URL parameter value

2009-08-18 Thread Dylan

Can you do $ie.frame(:index, 1).src
?
-Dylan

On Aug 17, 11:09 pm, Marlon marlonmoja...@gmail.com wrote:
 Im getting an error retrieving src value which is https://url.com/
 text.asp?p=xyzq=abc using attribute_value()

 code: $ie.frame(:index, 1).attribute_value(src)

 Error:
 NoMethodError: undefined method `attribute_value' for #Watir::Frame:
 0xfdbec50

 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] How to select the row under Grid which is an extjs code using WATIR

2009-08-18 Thread ashokmpm password

Hi, 

 
I have to select the row under Grid which is an extjs code. 

 
When we have a grid, and want to select a row in the grid, for some 
reason we cannot select it. We have sent click events and it appears 
that we're getting the right row (watir highlights the row in the 
browser), but our app code doesnt get the event from ext-js. 

 
Can some one help me how can i click/select this row, so that i can go 
ahead. 

 
Any help is appriciated. 

 
Bhavesh 



  

--~--~-~--~~~---~--~~
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] automating gmail using watir

2009-08-18 Thread shailesh

I am a new user of Watir. I did not get the solution thread so posting
here:
This is a program to automate gmail to compose mail and check in the
sent item but it gives the following error :

ruby autogmail.rb
Loaded suite autogmail
Started
E
Finished in 11.454 seconds.

  1) Error:
test_gmaildemo(GmailDemo):
Watir::Exception::UnknownFrameException: Unable to locate a frame with
id canvas_frame
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/frame.rb:
40:in `locate'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/frame.rb:
47:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/container.rb:
102:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/container.rb:
102:in `frame'
autogmail.rb:13:in `test_gmaildemo'

1 tests, 0 assertions, 0 failures, 1 errors
Exit code: 1


The original code is available in watir simple examples :

require 'test/unit'
require 'watir'

class GmailDemo  Test::Unit::TestCase
  def test_gmaildemo
ie = Watir::IE.new
ie.goto('mail.google.com')
ie.text_field(:name,'Email').set(em...@gmail.com)
ie.text_field(:name,'Passwd').set(password)
ie.button(:name,'signIn').click_no_wait

# We need the iframe with ID 'canvas_frame'.  Store it in a var.
canvas_frame = ie.frame(:id, 'canvas_frame')

# Get the current user's email address.  We'll be sending email to
it.
my_address = canvas_frame.div(:id, 'guser').text.slice(/^...@gmail
\.com/)
mail_subject = 'Hello Watir world!'
mail_body_text = 'Hi.'

canvas_frame.span(:text, 'Compose Mail').click # Compose new mail
canvas_frame.text_field(:name, 'to').set(my_address)
canvas_frame.text_field(:name, 'subject').set(mail_subject)
# The mail body field is contained in its own iframe, which only
contains
# a body element.  So, save the iframe in a var, then set the
innerText
# property of the iframe's body element.
mail_body_frame = canvas_frame.frame(:index, 1)
# TODO: there must be a friendlier way to do this, while still
avoiding
# hardcoding of any unfriendly identifiers. Does Watir need a body
method?
mail_body_frame.document.body.setproperty('innerText',
mail_body_text)

canvas_frame.button(:text, 'Send').click# Send the message
canvas_frame.link(:text, 'Sent Mail').click # Browse to sent mail
page
assert(canvas_frame.contains_text('Hello Watir world!'))
canvas_frame.link(:text, /Inbox/).click # Return to the inbox
page
ie.close
  end
end

--~--~-~--~~~---~--~~
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 do I get a URL parameter value

2009-08-18 Thread Dylan

I was just offering another way he might do it. I'm not at my machine
w/ ruby/watir so I cant test it right now.

=Dylan

On Aug 18, 12:28 am, Raveendran P jazzezr...@gmail.com wrote:
 Hi Dylan,

 *Way 1:*

 Please provide the code/site URL

 I will try and let u know

 *Way 2:*

 puts $ie.frame(:index, 1).methods.sort

 Search the output contains src method or not ?

 Thanks



 On Tue, Aug 18, 2009 at 12:18 PM, Dylan mej...@gmail.com wrote:

  Can you do $ie.frame(:index, 1).src
  ?
  -Dylan

  On Aug 17, 11:09 pm, Marlon marlonmoja...@gmail.com wrote:
   Im getting an error retrieving src value which is https://url.com/
   text.asp?p=xyzq=abc using attribute_value()

   code: $ie.frame(:index, 1).attribute_value(src)

   Error:
   NoMethodError: undefined method `attribute_value' for #Watir::Frame:
   0xfdbec50

   thanks

 --
 Regards,
 P.Raveendranhttp://raveendran.wordpress.com
--~--~-~--~~~---~--~~
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] doubt regarding puts() and gets() function

2009-08-18 Thread shailesh

have a look at the code :

puts(He)
puts(h)
i=gets()
puts(i)
 a very simple code but the output was :

ruby sunny.rb
hi
He
h
hi
Exit code: 0
 Here 'hi' was the input I gave. It always asks the user input
before executing the output

My question is how can I use puts() to print first and then take user
inputs ?
--~--~-~--~~~---~--~~
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: doubt regarding puts() and gets() function

2009-08-18 Thread Raveendran P
Hi,

Additionally This is the forum for Only Watir Users. So please post your
next ruby related question to Ruby-forums(http://ruby-forum.com).



On Tue, Aug 18, 2009 at 3:10 PM, Raveendran P jazzezr...@gmail.com wrote:

 Hi,

 1. Go to command prompt

 2. c:\WHERETHEcODEFolDER ruby sunny.rb

 3. try here and let me know

 Thanks


 On Tue, Aug 18, 2009 at 2:59 PM, shailesh shaileshbt...@gmail.com wrote:


 have a look at the code :

 puts(He)
 puts(h)
 i=gets()
 puts(i)
  a very simple code but the output was :

 ruby sunny.rb
 hi
 He
 h
 hi
 Exit code: 0
  Here 'hi' was the input I gave. It always asks the user input
 before executing the output

 My question is how can I use puts() to print first and then take user
 inputs ?
 



 --
 Regards,
 P.Raveendran
 http://raveendran.wordpress.com




-- 
Regards,
P.Raveendran
http://raveendran.wordpress.com

--~--~-~--~~~---~--~~
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: small problem regarding modules

2009-08-18 Thread Raveendran P
*Hi,


puts(hi) -- *

 hi -- returns He but you mentioned like puts(hi).So it returns the
nil for final puts which was added by you.


Thanks


On Tue, Aug 18, 2009 at 3:11 PM, shailesh shaileshbt...@gmail.com wrote:


 This is my module in a file named sunny.rb:

 Sunny.rb:

 module Sunny
 def hi
 puts(He)
  end
 end

 and this is file sunny1.rb where I call sunny.rb :

 Sunny1.rb:

 require 'watir'
 require'sunny.rb'
 include Sunny
 hi
 puts(hi)

 when i execute this, this is what I get:

 ruby sunny1.rb
 He
 He
 nil
 Exit code: 0


 My question is what is this nil for ? It might be easy or a small
 thing but I am not able to get the answer of this question. Thanks in
 advance for the answer.


 



-- 
Regards,
P.Raveendran
http://raveendran.wordpress.com

--~--~-~--~~~---~--~~
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: small problem regarding modules

2009-08-18 Thread shailesh jha
Hi,
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: Modal dialog window opened from page_load event

2009-08-18 Thread Pallavi Sharma
Hi

I have also encountered a similar problem, of handling popup during page
load and page close events.

Is there any solution for the same in watir??

On Tue, Aug 18, 2009 at 2:44 PM, Ste stefano.porcare...@poste.it wrote:


 Hi,
 I am not able to handle modal dialog window controls when such a
 window is opened from the page_load event on the server side code
 (which launches a script included in the .aspx page). In more detail
 (I have inspected the code) within the function page_load on the
 server page (.cs) there is a line of code like this

 ClientScript.RegisterStartupScript( GetType(), MessaggeRule,
 OpenPopUpRule('+ mode + ',' + idGrid');, true);

 then, the javascript function included in the .aspx page OpenPopUpRule
 () call the method window.showModalDialog().

 I think this scenario is not included in the page
 http://wiki.openqa.org/display/WTR/Pop+Ups.

 In any case I have tried with send_keys() and Watir.autoit.Send() but
 I am not still able to access these modal dialog window controls.

 Thanks in advance for your help

 Ste

 


--~--~-~--~~~---~--~~
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: :index = 0 with firewatir

2009-08-18 Thread Alexandre

Le vendredi 14 août de l'année 2009, vers 20 heures et 20 minutes, Jari Bakken 
écrivait:
 The best solution for getting the last item in this case is:
 browser.links.select { |l| l.text == 'foo' }.last

That is exactly what I was looking for.
(And yes I had to search in text)
thank you for help

-- 
Alexandre Delanoë

--~--~-~--~~~---~--~~
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.attach doesn't work properly in the script

2009-08-18 Thread balbao

HI Dylan,

Do i have to try the new version of Watir?



On Aug 17, 11:02 am, balbao ramkrishn...@gmail.com wrote:
 Dylan,

 Adding require Watir/ie didn't help me either.

 ruby -v
 ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

 puts Watir::IE::VERSION
 1.6.2

 I use ruby 1.8.6  watir 1.6.2 version.

 -Balbao

 On Aug 17, 10:35 am, Dylan mej...@gmail.com wrote:

  This might not be your issue, but have you tried adding a require
  watir/ie line? If that doesn't help, please provide information on
  what versions of watir and ruby you're using.

  -Dylan

  On Aug 16, 10:17 pm,balbaoramkrishn...@gmail.com wrote:

   Folks,

   Have any of you faced similar kind of issue ?. This is a blocker for
   me...Need help.

   On Aug 14, 12:04 pm,balbaoramkrishn...@gmail.com wrote:

HI,

In my application, to enter a date for a field, we need to do it using
the calendar icon. This is the only option to enter data in that
field. The code i wrote for this is

 $ie.image(:src, /calendar/).click
sleep(7)
    $ie2 = Watir::IE.find(:title, /Calendar/)
    $ie2.select_list(:id, /month/).select('June')
    $ie2.text_field(:id, /year/).set('2008')
    sleep(3)
    $ie2.link(:index, 22).click

I tried this in IRB and it worked fine. Nevertheless, when i inserted
this into script, after selecting the month [$ie2.select_list(:id, /
month/).select('June') ], the script execution ceased. No error was
thrown even after one hour.
I got this error, after closing the console manually Exit code:
-1073741510. Not sure, why this surfaced.

My hunch is that the console is expecting some sort of response.

   Balbao.
--~--~-~--~~~---~--~~
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 Logo Refresh Competition

2009-08-18 Thread Željko Filipin
Alister,

Have you received some logos?

Željko
--
http://watirpodcast.com/

--~--~-~--~~~---~--~~
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.attach doesn't work properly in the script

2009-08-18 Thread balbao

HI,

At last, i sorta understood the problem.  After the month is changed,
the page is getting re-loaded again to display the dates for that
month. The implicit wait is called.

I tried another approach and ran into another issue.

If i first change the year using  ie.text_field(:id, /year/).set
('2002') , the year is entered and the following error is thrown.

WIN32OLERuntimeError: unknown property or method `fireEvent'
HRESULT error code:0x80070005
  Access is denied.
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:336:in `method_missing'
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:336:in `set'
from (irb):11

I tried this from IRB. Not sure why firevent method is called post
entering value in that text field.

Need your help fellas. I'm stuck with this from the past two days.

- Balbao

On Aug 18, 6:27 pm, balbao ramkrishn...@gmail.com wrote:
 Dylan,

 This time when i closed the console window, i get the following error.

 C:/RUBY/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:
 447:in `method_missing': unknown property or method
 `document' (WIN32OLERuntimeError)
     HRESULT error code:0x80010108
       The object invoked has disconnected from its clients.
         from C:/RUBY/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:
 447:in `document'
         from C:/RUBY/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 container.rb:738:in `locate_input_element'
         from C:/RUBY/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 input_elements.rb:5:in `locate'
         from C:/RUBY/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
 49:in `assert_exists'
         from C:/RUBY/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
 284:in `enabled?'
         from C:/RUBY/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
 56:in `assert_enabled'
         from C:/RUBY/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
 266:in `focus'
         from order_flow.rb:145:in `tbill_entry'
         from order_flow.rb:161

 I slightly modified the code. I inserted $ie2.text_field(:id, /
 year/).focus to have the focus on the desired field.

 Ring any bell?

 Balbao

 On Aug 18, 5:32 pm, balbao ramkrishn...@gmail.com wrote:

  HI Dylan,

  Do i have to try the new version of Watir?

  On Aug 17, 11:02 am, balbao ramkrishn...@gmail.com wrote:

   Dylan,

   Adding require Watir/ie didn't help me either.

   ruby -v
   ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

   puts Watir::IE::VERSION
   1.6.2

   I use ruby 1.8.6  watir 1.6.2 version.

   -Balbao

   On Aug 17, 10:35 am, Dylan mej...@gmail.com wrote:

This might not be your issue, but have you tried adding a require
watir/ie line? If that doesn't help, please provide information on
what versions of watir and ruby you're using.

-Dylan

On Aug 16, 10:17 pm,balbaoramkrishn...@gmail.com wrote:

 Folks,

 Have any of you faced similar kind of issue ?. This is a blocker for
 me...Need help.

 On Aug 14, 12:04 pm,balbaoramkrishn...@gmail.com wrote:

  HI,

  In my application, to enter a date for a field, we need to do it 
  using
  the calendar icon. This is the only option to enter data in that
  field. The code i wrote for this is

   $ie.image(:src, /calendar/).click
  sleep(7)
      $ie2 = Watir::IE.find(:title, /Calendar/)
      $ie2.select_list(:id, /month/).select('June')
      $ie2.text_field(:id, /year/).set('2008')
      sleep(3)
      $ie2.link(:index, 22).click

  I tried this in IRB and it worked fine. Nevertheless, when i 
  inserted
  this into script, after selecting the month [$ie2.select_list(:id, /
  month/).select('June') ], the script execution ceased. No error was
  thrown even after one hour.
  I got this error, after closing the console manually Exit code:
  -1073741510. Not sure, why this surfaced.

  My hunch is that the console is expecting some sort of response.

 Balbao.
--~--~-~--~~~---~--~~
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: Fire Watir and Safari Watir

2009-08-18 Thread Loft_Tester

tables are supported.  we have many table tests

On Aug 7, 8:35 am, Angrez Singh ang...@gmail.com wrote:
 I think FireWatir does support Table element. look at the unit tests for
 more details.

 Thanks,
 Angrez

 On Fri, Aug 7, 2009 at 4:24 PM, Pallavi Sharma write2pall...@gmail.comwrote:



  Hey Angrez,

  I found out Fire Watir doesn't supports Table element yet? Is that so?

  Is there a list of elements not supported, supported etc..??

  Can you please share...

  On Thu, Aug 6, 2009 at 7:00 PM, Angrez Singh ang...@gmail.com wrote:

  Not sure about SafariWatir but FireWatir is now a part of Watir
  installation. Why not you try using it and let us know if you find any
  difference between the two.
  More information here:
 http://wiki.openqa.org/display/WTR/FireWatir

  Thanks,
  Angrez

  On Thu, Aug 6, 2009 at 6:16 PM, Pallavi Sharma 
  write2pall...@gmail.comwrote:

  Hi

  Has anyone ever used FireWatir and Safari Watir here?

  Does these two flavours of watir support all kinds of elements. Is there
  any method element supported list for them available like we have for 
  watir.

  Anyone here, please update..

  Thanks

  Pallavi
--~--~-~--~~~---~--~~
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: automating gmail using watir

2009-08-18 Thread Bill Agee
Hi,

I notice you are using click_no_wait when submitting your gmail
credentials.  Could it be that your script moves on to the next line
(finding the iframe) before the browser has finished loading the main
document after login?  What happens if you replace click_no_wait with click?

But even if that is fixed, you may find that the script fails when locating
the 'Send' button.  (That is where it breaks down for me today.)  I found a
post on a selenium mailing list in June where someone complained of the same
problem.

I posted the original wiki page with this code, but since then it's become
obvious that gmail is a moving target that is tough to hit.  :)  It seems to
me that the gmail team is either actively trying to discourage casual
automation, or at least has no interest in making it easy.

So I am considering removing the wiki page I wrote on this topic, mainly
because the code doesn't work anymore - and even if it were made to work
today, it would probably break again soon due to future gmail changes.  Any
contrary opinions?

Thanks
Bill

On Mon, Aug 17, 2009 at 11:10 PM, shailesh shaileshbt...@gmail.com wrote:


 I am a new user of Watir. I did not get the solution thread so posting
 here:
 This is a program to automate gmail to compose mail and check in the
 sent item but it gives the following error :

 ruby autogmail.rb
 Loaded suite autogmail
 Started
 E
 Finished in 11.454 seconds.

  1) Error:
 test_gmaildemo(GmailDemo):
 Watir::Exception::UnknownFrameException: Unable to locate a frame with
 id canvas_frame
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/frame.rb:
 40:in `locate'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/frame.rb:
 47:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/container.rb:
 102:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/container.rb:
 102:in `frame'
autogmail.rb:13:in `test_gmaildemo'

 1 tests, 0 assertions, 0 failures, 1 errors
 Exit code: 1


 The original code is available in watir simple examples :

 require 'test/unit'
 require 'watir'

 class GmailDemo  Test::Unit::TestCase
  def test_gmaildemo
ie = Watir::IE.new
ie.goto('mail.google.com')
ie.text_field(:name,'Email').set(em...@gmail.com)
ie.text_field(:name,'Passwd').set(password)
ie.button(:name,'signIn').click_no_wait

# We need the iframe with ID 'canvas_frame'.  Store it in a var.
canvas_frame = ie.frame(:id, 'canvas_frame')

# Get the current user's email address.  We'll be sending email to
 it.
my_address = canvas_frame.div(:id, 'guser').text.slice(/^...@gmail
 \.com/)
mail_subject = 'Hello Watir world!'
mail_body_text = 'Hi.'

canvas_frame.span(:text, 'Compose Mail').click # Compose new mail
canvas_frame.text_field(:name, 'to').set(my_address)
canvas_frame.text_field(:name, 'subject').set(mail_subject)
# The mail body field is contained in its own iframe, which only
 contains
# a body element.  So, save the iframe in a var, then set the
 innerText
# property of the iframe's body element.
mail_body_frame = canvas_frame.frame(:index, 1)
# TODO: there must be a friendlier way to do this, while still
 avoiding
# hardcoding of any unfriendly identifiers. Does Watir need a body
 method?
mail_body_frame.document.body.setproperty('innerText',
 mail_body_text)

canvas_frame.button(:text, 'Send').click# Send the message
canvas_frame.link(:text, 'Sent Mail').click # Browse to sent mail
 page
assert(canvas_frame.contains_text('Hello Watir world!'))
canvas_frame.link(:text, /Inbox/).click # Return to the inbox
 page
ie.close
  end
 end

 


--~--~-~--~~~---~--~~
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: Modal dialog window opened from page_load event

2009-08-18 Thread Charley Baker
Watir has a page checker that allows you to run specific methods on page
load. Something along the lines of this:


module PageCheckers
  HANDLE_MODAL = lambda {|ie| ie.modal_dialog.button(:id, 'ok').click} # or
whatever, do something with your modal dialog
end

register the method

ie.add_checker PageCheckers ::HANDLE_MODAL
Now when you go to a page

ie.goto http://www.google.com http://microsoft.com/

This method is called on page load.


Charley Baker
Lead Developer, Watir, http://wtr.rubyforge.org


On Tue, Aug 18, 2009 at 4:36 AM, Pallavi Sharma write2pall...@gmail.comwrote:

 Hi

 I have also encountered a similar problem, of handling popup during page
 load and page close events.

 Is there any solution for the same in watir??


 On Tue, Aug 18, 2009 at 2:44 PM, Ste stefano.porcare...@poste.it wrote:


 Hi,
 I am not able to handle modal dialog window controls when such a
 window is opened from the page_load event on the server side code
 (which launches a script included in the .aspx page). In more detail
 (I have inspected the code) within the function page_load on the
 server page (.cs) there is a line of code like this

 ClientScript.RegisterStartupScript( GetType(), MessaggeRule,
 OpenPopUpRule('+ mode + ',' + idGrid');, true);

 then, the javascript function included in the .aspx page OpenPopUpRule
 () call the method window.showModalDialog().

 I think this scenario is not included in the page
 http://wiki.openqa.org/display/WTR/Pop+Ups.

 In any case I have tried with send_keys() and Watir.autoit.Send() but
 I am not still able to access these modal dialog window controls.

 Thanks in advance for your help

 Ste




 


--~--~-~--~~~---~--~~
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] Firefox.new closes all FF windows, then spins indefinitely

2009-08-18 Thread lsiden

On my Linux box, I installed the JSSH addon to Firefox and tested it
with telnet localhost 9997.
In irb, when I enter b=Firefox.new, it 1. opens a new window, 2.
closes all windows, 3. spins for a long time while I see the CPU
indicator on my system monitor applet running at ~50%.  Has this
happened to anyone else and is there a known solution?  (My Google
searches turn up nada.)  Otherwise, how can I start debugging this?  I
am an experienced developer, but new to Ruby.

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