[wtr-general] where was the send method placed in?

2008-10-07 Thread bugs apple
In the locator.rb for watir api, there is call that execute the
element.send(@how) method like below,
but I fail to find the send method in element.rb,

anybody can tell where it is and which rb files?

 def locate
  object_index = 1
  @elements.each do |object|
element = Element.new(object)
if @types.include?(element.type)
  if @how == :index
attribute = object_index
  else
begin
 puts @how
  attribute = element.send(@how)
rescue NoMethodError
  raise MissingWayOfFindingObjectException,
"[EMAIL PROTECTED] is an unknown way of finding an  
element (
[EMAIL PROTECTED])"
end
  end
  if @what.matches(attribute)
if @value
  if element.value == @value
return object
  end
else
  return object
end
  end
  object_index += 1
end
  end
  return nil
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: ERROR installing watir

2008-10-07 Thread Tim Koopmans

Dang, can't take my own advice =)

I've created an MSI based on Windows XP SP2 with Ruby 1.8.6 and Watir
1.5.6 here:
http://justaddwatir.com/watir/wp-content/uploads/watir_156.msi

Feel free to try it out, no guarantees of course ... There is also
some brief instructions for use here:
http://justaddwatir.com/watir/q-how-do-i-install-watir-standalone/

Regards,
Tim Koopmans
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: HOW TO IMPROVE THE EFFICIENCY OF DEVELOP THE WATIR CODE

2008-10-07 Thread bugs apple
Even if I go through the JAF code, but the discoveryobject.rb still does not
work in Watir Environment, maybe it was banded in FireWatir.

Have you any other suggestions?

Thanks
-Wiston.




2008/10/7 aidy lewis <[EMAIL PROTECTED]>

>
> On 07/10/2008, bugs apple <[EMAIL PROTECTED]> wrote:
> >
> > I am very interesting in your code for learning the objects in
> discovery.rb,
> > but it does not work in my machine, and it work well in firewatir.
> > Have you the similar method code for the IE watir  to discovery the
> objects
> > on page? Or could you please provide some suggestion so that I can modify
> it
> > for work.
> >
>
> I didn't write this; I forgot who did!
>
> But why not leave a comment here
>
>
> http://90kts.com/blog/2008/just-another-framework-for-developing-watir-test-cases/
>  ?
>
> Aidy
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Bug Fix For Watir 1.5.6

2008-10-07 Thread bugs apple
Yes, I known this but I want to get it work.

*Hi, more watir developers,*

Another questions about the email title, there are two issues below I am
very concern.

a, For the bug ticket in jira, http://jira.openqa.org/browse/WTR-193,  on
our tested system, there are lots of duplicate objects, which are equipped
with the input tag, it seemed for me now to not identify them using the
index attribute, so, i want to know when fix and release it?

b, pls see the script below,
ie=Watir::IE.attach(:title, /QTP/)
ie.text_field(:name => "test").set "abb",
it throws the exception when execute it, in the following version, whether
the object support the hash data structure for "How" or "What"
attributes or not, even if there is only one element(key-value) in hash?
such as:  h=hash.new, h={:name=>"test"}, ie.text_field(h).set "Just a test",

who can give me some tips and I have to solve it for these urgent issues, or
provide some similar ideas ?



2008/10/8 Michael Hwee <[EMAIL PROTECTED]>

>  Hi Wiston,
> The text_field element does not support multiple-attributes as of now.
> So, that is not unusual to get error with hash parameter.
>
> Michael
>
>  --
> *From:* bugs apple <[EMAIL PROTECTED]>
> *To:* watir-general@googlegroups.com
> *Sent:* Tuesday, October 7, 2008 5:22:11 AM
> *Subject:* [wtr-general] Re: Bug Fix For Watir 1.5.6
>
>  hi, aidy
>
> For the current version, the watir support the hash data for the multiple
> attributes,
> but, I fail to execute this statement ie.text_field(:name => "test").set
> "abb" when only specify one attribute.
> In fact, I want to the hash varible for parameter transferring after
> package it as a function and bring more convenience
> for the users, do you think?  have a similar way to solve it?
>
>
> thanks
> -Wiston
>
>
>
> 2008/10/7 aidy lewis <[EMAIL PROTECTED]>
>
>>
>> On 07/10/2008, bugs apple <[EMAIL PROTECTED]> wrote:
>>
>> > ie.text_field(:name => "test").set "abb",
>>
>> If you are just hooking onto one attribute use
>> ie.text_field(:name, "test").set "abb"
>>
>> for > 1
>> ie.text_field(:name => "test", :id => "aidy").set "abb"
>>
>> or
>>
>> ie.text_field(:name => "test", :index=> 1).set "abb"
>>
>> or something like that
>>
>> Aidy
>>
>>
>>
>> Aidy
>>
>>
>>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: text_field

2008-10-07 Thread wesley chen
Weird, I can make it with your code.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: ERROR installing watir

2008-10-07 Thread Tim Koopmans

Indeed, it's a chicken and egg scenario =)

I used to package applications into MSIs; I've often thought about
rolling my own msi to take from site to site, as the organizations I
work in rarely have unauthenticated access to the internet. However
doing it via a batch file works well for me. An MSI would just
introduce version problems if watir (or its dependencies) are
regularly updated. Would still consider doing this though if it's a
common problem to the community ...

Cheers,
Tim Koopmans
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate the element with node(child node, father node) or directory attributes?

2008-10-07 Thread wesley chen
Thanks Bret, your comment works.
I mistake the parent as parentNode, so I always failed.

Hi, Aidy,
Would you please show your idea more detailed?
I think your idea may be useful sometimes.


Thanks all you guys.

Wesley.
--:)
Man should be hard to himself, but tolerant to others.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate an INPUT element embedeed in a table

2008-10-07 Thread Cynthia Zhang

This shall work as well:

ie.form(:id,'login_form').text_field(:name, 'u_name').set'user'
ie.form(:id,'login_form').text_field(:name, 'p_word').set'password'
ie.form(:id,'login_form').button(:class,'btSubmit').click
 

-Original Message-
From: watir-general@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Tiffany Fodor
Sent: Wednesday, 8 October 2008 8:20 a.m.
To: Watir General
Subject: [wtr-general] Re: How to locate an INPUT element embedeed in a table


Yay!  Nice work Ravi!


On Oct 7, 2:13 pm, Ravi <[EMAIL PROTECTED]> wrote:
> I found the following working!
>
> $ie.div(:id,'maincontent').text_field(:name,'u_name').set '1234'
>
> $ie.div(:id,'maincontent').text_field(:name,'p_word').set '1234'
>
> On Oct 7, 12:26 pm, Tiffany Fodor <[EMAIL PROTECTED]> wrote:
>
> > Hi again!
>
> > I didn't realize your site was public, so I gave it a shot myself.
> > The username and password on thehttp://www.fotolog.comhomepagework
> > fine, but I'm having the same problem with the password field on 
> > thehttp://account.fotolog.com/loginpage.
>
> > If you find a way around this, I'd be really excited to learn how 
> > you did it - this problem drove me nuts!
>
> > -Tiffany
>
> > On Oct 7, 11:12 am, Natasha Ranney <[EMAIL PROTECTED]> wrote:
>
> > > Thanks Tiffany. I will try that out. Just that this is not our code. This 
> > > belongs to Fotolog. But anyways, will surely try out the options 
> > > suggested and revert with my observations.
>
> > > Regards,
> > > Natasha
>
> > > Tiffany Fodor <[EMAIL PROTECTED]> wrote:
>
> > > Sorry, I should have included this in my original response
>
> > > I don't think your problem is related to your object being 
> > > embedded in a table, I think there's a protection on it that 
> > > doesn't allow automated tools to access it.  You can verify this 
> > > by just performing a .exists? on your object to make sure that 
> > > Watir can see that it's there.
>
> > > Also, if you're not using it already, command-line IRB is a great 
> > > way to troubleshoot working with objects.
>
> > > -Tiffany
>
> > > On Oct 7, 11:02 am, Tiffany Fodor  wrote:
>
> > > > Hi Natasha!
>
> > > > I've run into the same problem with password confirmation fields 
> > > > when adding a user in an application.  If the field will not 
> > > > accept focus from Watir, you may need to see if you can get your 
> > > > developer to change the properties on it.  I tried everything I 
> > > > could think of and even solicited help from several experts on 
> > > > the list with whom I could share my private URL.  In my case, 
> > > > there was no way around the protection on the field.
>
> > > > Off the top of my head, the things I tried were:
>
> > > > - using each property available to identify the field
> > > > - using the field index to identify it
> > > > - using send keys to tab to the field from a known location and 
> > > > type in it
>
> > > > If none of these work for you, I suggest you work with your 
> > > > developer to get it changed.
>
> > > > Sorry I couldn't be more help.
>
> > > > -Tiffany
>
> > > > On Oct 7, 10:27 am, Natasha  wrote:
>
> > > > > Hello All,
>
> > > > > I am trying to automate Fotolog's login page. Please could you 
> > > > > help me.
>
> > > > > Following is the snippet of HTML code:
> > > > > --
> > > > > -
>
> > > > >                                 Username:
> > > > >                                  [input]
>
> > > > >                                 Password:
> > > > >                                  [input]
>
> > > > > class="btSubmit0">Login
>
> > > > >                                 Forgot your password?
>
> > > > > --
> > > > > ---
>
> > > > > I need to automate the typing in user name and password, 
> > > > > followed by clicking on login button.
>
> > > > > I have tried following sets of codes, but it didn't work.
>
> > > > > 1.  Accessing text type fields using aftertext attribute
>
> > > > > $ie.text_field(:aftertext,/Username:/).set("user1")
> > > > > $ie.text_field(:aftertext,/Password:/).set("pwd1")
> > > > > $ie.button(:text,"Login").click
>
> > > > > 2. Accessing text fields using name attribute
>
> > > > > $ie.text_field(:name,"u_name").set("user1")
> > > > > $ie.text_field(:name,"p_word").set("pwd1")
> > > > > $ie.button(:text,"Login").click
>
> > > > > Am getting following error:
> > > > > 
> > > > > WIN32OLERuntimeError: focus
> > > > >     OLE error code:800A083E in htmlfile
> > > > >       Can't move focus to the control because it is invisible, 
> > > > > not enabled, or o f a type that does not accept the focus.
> > > > >     HRESULT error code:0x80020009
> > > > >       Exception occurred.
> > > > >     c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > > > > input_elements.rb:334:in
> > > > > `method_mi

[wtr-general] Re: text_field

2008-10-07 Thread Fukaya Yoshikazu

help me

How can I access to the following text_field !
I could not get to it by using
"ie.text_field(:name,'miseCode').set('1234')"
Why!
can't  Watir access to a text_field without 'type=' like this?
--


title

   
 

-- 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Clicking a menu item

2008-10-07 Thread Tiffany Fodor

Hi!

Have you tried clicking on the span itself?

ie.span(:text, 'SpanText').click

-Tiffany

On Oct 7, 3:27 pm, FM <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to click a menu item on the webpage using it's id but it
> does not seem to work. Any suggestion? The menu item is contained by
>  element.
>
> Thank you.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Clicking a menu item

2008-10-07 Thread FM

Hi,

I am trying to click a menu item on the webpage using it's id but it
does not seem to work. Any suggestion? The menu item is contained by
 element.

Thank you.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate an INPUT element embedeed in a table

2008-10-07 Thread Tiffany Fodor

Yay!  Nice work Ravi!


On Oct 7, 2:13 pm, Ravi <[EMAIL PROTECTED]> wrote:
> I found the following working!
>
> $ie.div(:id,'maincontent').text_field(:name,'u_name').set '1234'
>
> $ie.div(:id,'maincontent').text_field(:name,'p_word').set '1234'
>
> On Oct 7, 12:26 pm, Tiffany Fodor <[EMAIL PROTECTED]> wrote:
>
> > Hi again!
>
> > I didn't realize your site was public, so I gave it a shot myself.
> > The username and password on thehttp://www.fotolog.comhomepagework
> > fine, but I'm having the same problem with the password field on 
> > thehttp://account.fotolog.com/loginpage.
>
> > If you find a way around this, I'd be really excited to learn how you
> > did it - this problem drove me nuts!
>
> > -Tiffany
>
> > On Oct 7, 11:12 am, Natasha Ranney <[EMAIL PROTECTED]> wrote:
>
> > > Thanks Tiffany. I will try that out. Just that this is not our code. This 
> > > belongs to Fotolog. But anyways, will surely try out the options 
> > > suggested and revert with my observations.
>
> > > Regards,
> > > Natasha
>
> > > Tiffany Fodor <[EMAIL PROTECTED]> wrote:
>
> > > Sorry, I should have included this in my original response
>
> > > I don't think your problem is related to your object being embedded in
> > > a table, I think there's a protection on it that doesn't allow
> > > automated tools to access it.  You can verify this by just performing
> > > a .exists? on your object to make sure that Watir can see that it's
> > > there.
>
> > > Also, if you're not using it already, command-line IRB is a great way
> > > to troubleshoot working with objects.
>
> > > -Tiffany
>
> > > On Oct 7, 11:02 am, Tiffany Fodor  wrote:
>
> > > > Hi Natasha!
>
> > > > I've run into the same problem with password confirmation fields when
> > > > adding a user in an application.  If the field will not accept focus
> > > > from Watir, you may need to see if you can get your developer to
> > > > change the properties on it.  I tried everything I could think of and
> > > > even solicited help from several experts on the list with whom I could
> > > > share my private URL.  In my case, there was no way around the
> > > > protection on the field.
>
> > > > Off the top of my head, the things I tried were:
>
> > > > - using each property available to identify the field
> > > > - using the field index to identify it
> > > > - using send keys to tab to the field from a known location and type
> > > > in it
>
> > > > If none of these work for you, I suggest you work with your developer
> > > > to get it changed.
>
> > > > Sorry I couldn't be more help.
>
> > > > -Tiffany
>
> > > > On Oct 7, 10:27 am, Natasha  wrote:
>
> > > > > Hello All,
>
> > > > > I am trying to automate Fotolog's login page. Please could you help
> > > > > me.
>
> > > > > Following is the snippet of HTML code:
> > > > > ---
>
> > > > >                                 Username:
> > > > >                                  [input]
>
> > > > >                                 Password:
> > > > >                                  [input]
>
> > > > > class="btSubmit0">Login
>
> > > > >                                 Forgot your password?
>
> > > > > -
>
> > > > > I need to automate the typing in user name and password, followed by
> > > > > clicking on login button.
>
> > > > > I have tried following sets of codes, but it didn't work.
>
> > > > > 1.  Accessing text type fields using aftertext attribute
>
> > > > > $ie.text_field(:aftertext,/Username:/).set("user1")
> > > > > $ie.text_field(:aftertext,/Password:/).set("pwd1")
> > > > > $ie.button(:text,"Login").click
>
> > > > > 2. Accessing text fields using name attribute
>
> > > > > $ie.text_field(:name,"u_name").set("user1")
> > > > > $ie.text_field(:name,"p_word").set("pwd1")
> > > > > $ie.button(:text,"Login").click
>
> > > > > Am getting following error:
> > > > > 
> > > > > WIN32OLERuntimeError: focus
> > > > >     OLE error code:800A083E in htmlfile
> > > > >       Can't move focus to the control because it is invisible, not
> > > > > enabled, or o
> > > > > f a type that does not accept the focus.
> > > > >     HRESULT error code:0x80020009
> > > > >       Exception occurred.
> > > > >     c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > > > > input_elements.rb:334:in
> > > > > `method_missing'
> > > > >     c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > > > > input_elements.rb:334:in
> > > > > `set'
> > > > >     C:/natasha/RubyScripts/FinalAutomatedTests/minicard_fotolog.rb:
> > > > > 54:in `test_a
> > > > > _orderPlacement'
> > > > > 
>
> > > > > Thanks and regards,
> > > > > Natasha
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Wa

[wtr-general] Re: Identifying Tabs

2008-10-07 Thread Fatema Karim
Thank you very much. I will try the suggestions you have given me.

On Tue, Oct 7, 2008 at 2:39 PM, Tiffany Fodor <[EMAIL PROTECTED]> wrote:

>
> Hi!
>
> When I've worked with tabs in the past, the text the user clicks on in
> the tab is usually a link.  Try something like this:
>
> ie.link(:text, 'Tab 1').click
>
> Hope this helps!
>
> -Tiffany
>
> On Oct 7, 11:26 am, FM <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have recently started using Watir. I think this is not a new
> > quesiton but I have searched for different solutions and they do not
> > seem to work. I have 6 tabs in a webpage, and I am trying to click one
> > of them but I am unable to do this since there is no object id or name
> > that I could use to locate the element. Please help.
> >
> > Thank you.
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate an INPUT element embedeed in a table

2008-10-07 Thread Ravi

I found the following working!

$ie.div(:id,'maincontent').text_field(:name,'u_name').set '1234'

$ie.div(:id,'maincontent').text_field(:name,'p_word').set '1234'


On Oct 7, 12:26 pm, Tiffany Fodor <[EMAIL PROTECTED]> wrote:
> Hi again!
>
> I didn't realize your site was public, so I gave it a shot myself.
> The username and password on thehttp://www.fotolog.comhomepage work
> fine, but I'm having the same problem with the password field on 
> thehttp://account.fotolog.com/loginpage.
>
> If you find a way around this, I'd be really excited to learn how you
> did it - this problem drove me nuts!
>
> -Tiffany
>
> On Oct 7, 11:12 am, Natasha Ranney <[EMAIL PROTECTED]> wrote:
>
> > Thanks Tiffany. I will try that out. Just that this is not our code. This 
> > belongs to Fotolog. But anyways, will surely try out the options suggested 
> > and revert with my observations.
>
> > Regards,
> > Natasha
>
> > Tiffany Fodor <[EMAIL PROTECTED]> wrote:
>
> > Sorry, I should have included this in my original response
>
> > I don't think your problem is related to your object being embedded in
> > a table, I think there's a protection on it that doesn't allow
> > automated tools to access it.  You can verify this by just performing
> > a .exists? on your object to make sure that Watir can see that it's
> > there.
>
> > Also, if you're not using it already, command-line IRB is a great way
> > to troubleshoot working with objects.
>
> > -Tiffany
>
> > On Oct 7, 11:02 am, Tiffany Fodor  wrote:
>
> > > Hi Natasha!
>
> > > I've run into the same problem with password confirmation fields when
> > > adding a user in an application.  If the field will not accept focus
> > > from Watir, you may need to see if you can get your developer to
> > > change the properties on it.  I tried everything I could think of and
> > > even solicited help from several experts on the list with whom I could
> > > share my private URL.  In my case, there was no way around the
> > > protection on the field.
>
> > > Off the top of my head, the things I tried were:
>
> > > - using each property available to identify the field
> > > - using the field index to identify it
> > > - using send keys to tab to the field from a known location and type
> > > in it
>
> > > If none of these work for you, I suggest you work with your developer
> > > to get it changed.
>
> > > Sorry I couldn't be more help.
>
> > > -Tiffany
>
> > > On Oct 7, 10:27 am, Natasha  wrote:
>
> > > > Hello All,
>
> > > > I am trying to automate Fotolog's login page. Please could you help
> > > > me.
>
> > > > Following is the snippet of HTML code:
> > > > ---
>
> > > > Username:
> > > >  [input]
>
> > > > Password:
> > > >  [input]
>
> > > > class="btSubmit0">Login
>
> > > > Forgot your password?
>
> > > > -
>
> > > > I need to automate the typing in user name and password, followed by
> > > > clicking on login button.
>
> > > > I have tried following sets of codes, but it didn't work.
>
> > > > 1.  Accessing text type fields using aftertext attribute
>
> > > > $ie.text_field(:aftertext,/Username:/).set("user1")
> > > > $ie.text_field(:aftertext,/Password:/).set("pwd1")
> > > > $ie.button(:text,"Login").click
>
> > > > 2. Accessing text fields using name attribute
>
> > > > $ie.text_field(:name,"u_name").set("user1")
> > > > $ie.text_field(:name,"p_word").set("pwd1")
> > > > $ie.button(:text,"Login").click
>
> > > > Am getting following error:
> > > > 
> > > > WIN32OLERuntimeError: focus
> > > > OLE error code:800A083E in htmlfile
> > > >   Can't move focus to the control because it is invisible, not
> > > > enabled, or o
> > > > f a type that does not accept the focus.
> > > > HRESULT error code:0x80020009
> > > >   Exception occurred.
> > > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > > > input_elements.rb:334:in
> > > > `method_missing'
> > > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > > > input_elements.rb:334:in
> > > > `set'
> > > > C:/natasha/RubyScripts/FinalAutomatedTests/minicard_fotolog.rb:
> > > > 54:in `test_a
> > > > _orderPlacement'
> > > > 
>
> > > > Thanks and regards,
> > > > Natasha
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more o

[wtr-general] Re: ERROR installing watir

2008-10-07 Thread Bret Pettichord

I've found that the gem installer works much better if you do a "gem 
update --system". Unfortunately this can be hard to do also (for the 
same reasons).

On one occassion, I did this update on a machine that did not have 
connection problems, then I copied the entire ruby directory to my other 
machines. After that, the gem installer worked great.

Bret

Tim Koopmans wrote:
> This happens to me a lot. Try installing from gem files downloaded
> manually. There's some instructions on how to do this here:
> http://justaddwatir.com/watir/q-how-do-i-gem-install-watir-behind-a-proxy-server/
>
> Check out the comments section for recent example.
>
> Regards,
> Tim Koopmans
> >
>   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate the element with node(child node, father node) or directory attributes?

2008-10-07 Thread Bret Pettichord

element1 = browser.link(:id, 'menu9373847813')
element2 = element1.parent.parent
element3 = element2.parent
element4 = browser.div(:after? => element2)

wesley chen wrote:
> Please watch the pic: question.jpg at first;
> When I locate the element A, how can I locate the element close to A 
> with node(child node, father node) or directory attributes?
>
> In fact, I ask the question because:
> The elements on the page are all dynamic, only one id can be fixed, so 
> I would like to locate the elements close to the id with child node or 
> father node or directory attributes.
>
> Use index may be a method, but not good.
>
>
> Any suggestion would be appreciated.
>
> Thanks.
> Wesley.
> --:)
> Man should be hard to himself, but tolerant to others.
>
> >
>
> 
>


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: ERROR installing watir

2008-10-07 Thread Tim Koopmans

This happens to me a lot. Try installing from gem files downloaded
manually. There's some instructions on how to do this here:
http://justaddwatir.com/watir/q-how-do-i-gem-install-watir-behind-a-proxy-server/

Check out the comments section for recent example.

Regards,
Tim Koopmans
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Identifying Tabs

2008-10-07 Thread Tiffany Fodor

Hi!

When I've worked with tabs in the past, the text the user clicks on in
the tab is usually a link.  Try something like this:

ie.link(:text, 'Tab 1').click

Hope this helps!

-Tiffany

On Oct 7, 11:26 am, FM <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have recently started using Watir. I think this is not a new
> quesiton but I have searched for different solutions and they do not
> seem to work. I have 6 tabs in a webpage, and I am trying to click one
> of them but I am unable to do this since there is no object id or name
> that I could use to locate the element. Please help.
>
> Thank you.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Identifying Tabs

2008-10-07 Thread Oscar Rosario
You should download and try "IE HTML Element Spy" or similar product(s).
Good luck.


From: watir-general@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Nathan Lane
Sent: Tuesday, October 07, 2008 2:58 PM
To: watir-general@googlegroups.com
Subject: [wtr-general] Re: Identifying Tabs

'Tabs' doesn't mean much to Watir I think, because there is no such thing as a 
tab HTML element (for example  doesn't exist in HTML), it would help us 
and you more if you could tell us if the tab is contained by a , , or 
 element or some other element.
On Tue, Oct 7, 2008 at 11:26 AM, FM <[EMAIL PROTECTED]> wrote:

Hi,

I have recently started using Watir. I think this is not a new
quesiton but I have searched for different solutions and they do not
seem to work. I have 6 tabs in a webpage, and I am trying to click one
of them but I am unable to do this since there is no object id or name
that I could use to locate the element. Please help.

Thank you.




--
Nathan Lane
Home, http://www.nathandelane.com
Blog, http://nathandelane.blogspot.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Identifying Tabs

2008-10-07 Thread Nathan Lane
'Tabs' doesn't mean much to Watir I think, because there is no such thing as
a tab HTML element (for example  doesn't exist in HTML), it would help
us and you more if you could tell us if the tab is contained by a ,
, or  element or some other element.

On Tue, Oct 7, 2008 at 11:26 AM, FM <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I have recently started using Watir. I think this is not a new
> quesiton but I have searched for different solutions and they do not
> seem to work. I have 6 tabs in a webpage, and I am trying to click one
> of them but I am unable to do this since there is no object id or name
> that I could use to locate the element. Please help.
>
> Thank you.
>
> >
>


-- 
Nathan Lane
Home, http://www.nathandelane.com
Blog, http://nathandelane.blogspot.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Identifying Tabs

2008-10-07 Thread FM

Hi,

I have recently started using Watir. I think this is not a new
quesiton but I have searched for different solutions and they do not
seem to work. I have 6 tabs in a webpage, and I am trying to click one
of them but I am unable to do this since there is no object id or name
that I could use to locate the element. Please help.

Thank you.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate an INPUT element embedeed in a table

2008-10-07 Thread Tiffany Fodor

Hi again!

I didn't realize your site was public, so I gave it a shot myself.
The username and password on the http://www.fotolog.com homepage work
fine, but I'm having the same problem with the password field on the
http://account.fotolog.com/login page.

If you find a way around this, I'd be really excited to learn how you
did it - this problem drove me nuts!

-Tiffany

On Oct 7, 11:12 am, Natasha Ranney <[EMAIL PROTECTED]> wrote:
> Thanks Tiffany. I will try that out. Just that this is not our code. This 
> belongs to Fotolog. But anyways, will surely try out the options suggested 
> and revert with my observations.
>
> Regards,
> Natasha
>
> Tiffany Fodor <[EMAIL PROTECTED]> wrote:
>
> Sorry, I should have included this in my original response
>
> I don't think your problem is related to your object being embedded in
> a table, I think there's a protection on it that doesn't allow
> automated tools to access it.  You can verify this by just performing
> a .exists? on your object to make sure that Watir can see that it's
> there.
>
> Also, if you're not using it already, command-line IRB is a great way
> to troubleshoot working with objects.
>
> -Tiffany
>
> On Oct 7, 11:02 am, Tiffany Fodor  wrote:
>
> > Hi Natasha!
>
> > I've run into the same problem with password confirmation fields when
> > adding a user in an application.  If the field will not accept focus
> > from Watir, you may need to see if you can get your developer to
> > change the properties on it.  I tried everything I could think of and
> > even solicited help from several experts on the list with whom I could
> > share my private URL.  In my case, there was no way around the
> > protection on the field.
>
> > Off the top of my head, the things I tried were:
>
> > - using each property available to identify the field
> > - using the field index to identify it
> > - using send keys to tab to the field from a known location and type
> > in it
>
> > If none of these work for you, I suggest you work with your developer
> > to get it changed.
>
> > Sorry I couldn't be more help.
>
> > -Tiffany
>
> > On Oct 7, 10:27 am, Natasha  wrote:
>
> > > Hello All,
>
> > > I am trying to automate Fotolog's login page. Please could you help
> > > me.
>
> > > Following is the snippet of HTML code:
> > > ---
>
> > >                                 Username:
> > >                                  [input]
>
> > >                                 Password:
> > >                                  [input]
>
> > > class="btSubmit0">Login
>
> > >                                 Forgot your password?
>
> > > -
>
> > > I need to automate the typing in user name and password, followed by
> > > clicking on login button.
>
> > > I have tried following sets of codes, but it didn't work.
>
> > > 1.  Accessing text type fields using aftertext attribute
>
> > > $ie.text_field(:aftertext,/Username:/).set("user1")
> > > $ie.text_field(:aftertext,/Password:/).set("pwd1")
> > > $ie.button(:text,"Login").click
>
> > > 2. Accessing text fields using name attribute
>
> > > $ie.text_field(:name,"u_name").set("user1")
> > > $ie.text_field(:name,"p_word").set("pwd1")
> > > $ie.button(:text,"Login").click
>
> > > Am getting following error:
> > > 
> > > WIN32OLERuntimeError: focus
> > >     OLE error code:800A083E in htmlfile
> > >       Can't move focus to the control because it is invisible, not
> > > enabled, or o
> > > f a type that does not accept the focus.
> > >     HRESULT error code:0x80020009
> > >       Exception occurred.
> > >     c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > > input_elements.rb:334:in
> > > `method_missing'
> > >     c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > > input_elements.rb:334:in
> > > `set'
> > >     C:/natasha/RubyScripts/FinalAutomatedTests/minicard_fotolog.rb:
> > > 54:in `test_a
> > > _orderPlacement'
> > > 
>
> > > Thanks and regards,
> > > Natasha
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate an INPUT element embedeed in a table

2008-10-07 Thread Natasha Ranney
Thanks Tiffany. I will try that out. Just that this is not our code. This 
belongs to Fotolog. But anyways, will surely try out the options suggested and 
revert with my observations.

Regards,
Natasha

Tiffany Fodor <[EMAIL PROTECTED]> wrote: 
Sorry, I should have included this in my original response

I don't think your problem is related to your object being embedded in
a table, I think there's a protection on it that doesn't allow
automated tools to access it.  You can verify this by just performing
a .exists? on your object to make sure that Watir can see that it's
there.

Also, if you're not using it already, command-line IRB is a great way
to troubleshoot working with objects.

-Tiffany


On Oct 7, 11:02 am, Tiffany Fodor  wrote:
> Hi Natasha!
>
> I've run into the same problem with password confirmation fields when
> adding a user in an application.  If the field will not accept focus
> from Watir, you may need to see if you can get your developer to
> change the properties on it.  I tried everything I could think of and
> even solicited help from several experts on the list with whom I could
> share my private URL.  In my case, there was no way around the
> protection on the field.
>
> Off the top of my head, the things I tried were:
>
> - using each property available to identify the field
> - using the field index to identify it
> - using send keys to tab to the field from a known location and type
> in it
>
> If none of these work for you, I suggest you work with your developer
> to get it changed.
>
> Sorry I couldn't be more help.
>
> -Tiffany
>
> On Oct 7, 10:27 am, Natasha  wrote:
>
> > Hello All,
>
> > I am trying to automate Fotolog's login page. Please could you help
> > me.
>
> > Following is the snippet of HTML code:
> > ---
>
> > 
> > 
> > Username:
> >  [input] 
> > 
> > 
> > Password:
> >  [input] 
> > 
> > 
> > 

> > 
> > class="btSubmit0">Login
> > 
> > 
> > Forgot your password?
> > 
> > 
> > -
>
> > I need to automate the typing in user name and password, followed by
> > clicking on login button.
>
> > I have tried following sets of codes, but it didn't work.
>
> > 1.  Accessing text type fields using aftertext attribute
>
> > $ie.text_field(:aftertext,/Username:/).set("user1")
> > $ie.text_field(:aftertext,/Password:/).set("pwd1")
> > $ie.button(:text,"Login").click
>
> > 2. Accessing text fields using name attribute
>
> > $ie.text_field(:name,"u_name").set("user1")
> > $ie.text_field(:name,"p_word").set("pwd1")
> > $ie.button(:text,"Login").click
>
> > Am getting following error:
> > 
> > WIN32OLERuntimeError: focus
> > OLE error code:800A083E in htmlfile
> >   Can't move focus to the control because it is invisible, not
> > enabled, or o
> > f a type that does not accept the focus.
> > HRESULT error code:0x80020009
> >   Exception occurred.
> > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > input_elements.rb:334:in
> > `method_missing'
> > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > input_elements.rb:334:in
> > `set'
> > C:/natasha/RubyScripts/FinalAutomatedTests/minicard_fotolog.rb:
> > 54:in `test_a
> > _orderPlacement'
> > 
>
> > Thanks and regards,
> > Natasha



   
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate an INPUT element embedeed in a table

2008-10-07 Thread Tiffany Fodor

Sorry, I should have included this in my original response

I don't think your problem is related to your object being embedded in
a table, I think there's a protection on it that doesn't allow
automated tools to access it.  You can verify this by just performing
a .exists? on your object to make sure that Watir can see that it's
there.

Also, if you're not using it already, command-line IRB is a great way
to troubleshoot working with objects.

-Tiffany


On Oct 7, 11:02 am, Tiffany Fodor <[EMAIL PROTECTED]> wrote:
> Hi Natasha!
>
> I've run into the same problem with password confirmation fields when
> adding a user in an application.  If the field will not accept focus
> from Watir, you may need to see if you can get your developer to
> change the properties on it.  I tried everything I could think of and
> even solicited help from several experts on the list with whom I could
> share my private URL.  In my case, there was no way around the
> protection on the field.
>
> Off the top of my head, the things I tried were:
>
> - using each property available to identify the field
> - using the field index to identify it
> - using send keys to tab to the field from a known location and type
> in it
>
> If none of these work for you, I suggest you work with your developer
> to get it changed.
>
> Sorry I couldn't be more help.
>
> -Tiffany
>
> On Oct 7, 10:27 am, Natasha <[EMAIL PROTECTED]> wrote:
>
> > Hello All,
>
> > I am trying to automate Fotolog's login page. Please could you help
> > me.
>
> > Following is the snippet of HTML code:
> > ---
>
> >                         
> >                         
> >                                 Username:
> >                                  > maxlength="16" value="">
> >                         
> >                         
> >                                 Password:
> >                                  > name="p_word">
> >                         
> >                         
> >                                 
> >                                  > class="btSubmit0">Login
> >                         
> >                         
> >                                  > href="http://account.fotolog.com/
> > forgot_password">Forgot your password?
> >                         
> >                         
> > -
>
> > I need to automate the typing in user name and password, followed by
> > clicking on login button.
>
> > I have tried following sets of codes, but it didn't work.
>
> > 1.  Accessing text type fields using aftertext attribute
>
> > $ie.text_field(:aftertext,/Username:/).set("user1")
> > $ie.text_field(:aftertext,/Password:/).set("pwd1")
> > $ie.button(:text,"Login").click
>
> > 2. Accessing text fields using name attribute
>
> > $ie.text_field(:name,"u_name").set("user1")
> > $ie.text_field(:name,"p_word").set("pwd1")
> > $ie.button(:text,"Login").click
>
> > Am getting following error:
> > 
> > WIN32OLERuntimeError: focus
> >     OLE error code:800A083E in htmlfile
> >       Can't move focus to the control because it is invisible, not
> > enabled, or o
> > f a type that does not accept the focus.
> >     HRESULT error code:0x80020009
> >       Exception occurred.
> >     c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > input_elements.rb:334:in
> > `method_missing'
> >     c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> > input_elements.rb:334:in
> > `set'
> >     C:/natasha/RubyScripts/FinalAutomatedTests/minicard_fotolog.rb:
> > 54:in `test_a
> > _orderPlacement'
> > 
>
> > Thanks and regards,
> > Natasha
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate an INPUT element embedeed in a table

2008-10-07 Thread Tiffany Fodor

Hi Natasha!

I've run into the same problem with password confirmation fields when
adding a user in an application.  If the field will not accept focus
from Watir, you may need to see if you can get your developer to
change the properties on it.  I tried everything I could think of and
even solicited help from several experts on the list with whom I could
share my private URL.  In my case, there was no way around the
protection on the field.

Off the top of my head, the things I tried were:

- using each property available to identify the field
- using the field index to identify it
- using send keys to tab to the field from a known location and type
in it

If none of these work for you, I suggest you work with your developer
to get it changed.

Sorry I couldn't be more help.

-Tiffany


On Oct 7, 10:27 am, Natasha <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I am trying to automate Fotolog's login page. Please could you help
> me.
>
> Following is the snippet of HTML code:
> ---
>
>                         
>                         
>                                 Username:
>                                  maxlength="16" value="">
>                         
>                         
>                                 Password:
>                                 
>                         
>                         
>                                 
>                                  class="btSubmit0">Login
>                         
>                         
>                                  href="http://account.fotolog.com/
> forgot_password">Forgot your password?
>                         
>                         
> -
>
> I need to automate the typing in user name and password, followed by
> clicking on login button.
>
> I have tried following sets of codes, but it didn't work.
>
> 1.  Accessing text type fields using aftertext attribute
>
> $ie.text_field(:aftertext,/Username:/).set("user1")
> $ie.text_field(:aftertext,/Password:/).set("pwd1")
> $ie.button(:text,"Login").click
>
> 2. Accessing text fields using name attribute
>
> $ie.text_field(:name,"u_name").set("user1")
> $ie.text_field(:name,"p_word").set("pwd1")
> $ie.button(:text,"Login").click
>
> Am getting following error:
> 
> WIN32OLERuntimeError: focus
>     OLE error code:800A083E in htmlfile
>       Can't move focus to the control because it is invisible, not
> enabled, or o
> f a type that does not accept the focus.
>     HRESULT error code:0x80020009
>       Exception occurred.
>     c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> input_elements.rb:334:in
> `method_missing'
>     c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
> input_elements.rb:334:in
> `set'
>     C:/natasha/RubyScripts/FinalAutomatedTests/minicard_fotolog.rb:
> 54:in `test_a
> _orderPlacement'
> 
>
> Thanks and regards,
> Natasha
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] How to locate an INPUT element embedeed in a table

2008-10-07 Thread Natasha

Hello All,

I am trying to automate Fotolog's login page. Please could you help
me.

Following is the snippet of HTML code:
---



Username:



Password:




Login


http://account.fotolog.com/
forgot_password">Forgot your password?


-

I need to automate the typing in user name and password, followed by
clicking on login button.

I have tried following sets of codes, but it didn't work.

1.  Accessing text type fields using aftertext attribute

$ie.text_field(:aftertext,/Username:/).set("user1")
$ie.text_field(:aftertext,/Password:/).set("pwd1")
$ie.button(:text,"Login").click

2. Accessing text fields using name attribute

$ie.text_field(:name,"u_name").set("user1")
$ie.text_field(:name,"p_word").set("pwd1")
$ie.button(:text,"Login").click

Am getting following error:

WIN32OLERuntimeError: focus
OLE error code:800A083E in htmlfile
  Can't move focus to the control because it is invisible, not
enabled, or o
f a type that does not accept the focus.
HRESULT error code:0x80020009
  Exception occurred.
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
input_elements.rb:334:in
`method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/
input_elements.rb:334:in
`set'
C:/natasha/RubyScripts/FinalAutomatedTests/minicard_fotolog.rb:
54:in `test_a
_orderPlacement'



Thanks and regards,
Natasha
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Bug Fix For Watir 1.5.6

2008-10-07 Thread Michael Hwee
Hi Wiston,
The text_field element does not support multiple-attributes as of now.
So, that is not unusual to get error with hash parameter.

Michael





From: bugs apple <[EMAIL PROTECTED]>
To: watir-general@googlegroups.com
Sent: Tuesday, October 7, 2008 5:22:11 AM
Subject: [wtr-general] Re: Bug Fix For Watir 1.5.6


hi, aidy
 
For the current version, the watir support the hash data for the multiple 
attributes,
but, I fail to execute this statement ie.text_field(:name => "test").set "abb" 
when only specify one attribute.
In fact, I want to the hash varible for parameter transferring after package it 
as a function and bring more convenience 
for the users, do you think?  have a similar way to solve it?
 
 
thanks
-Wiston


 
2008/10/7 aidy lewis <[EMAIL PROTECTED]>


On 07/10/2008, bugs apple <[EMAIL PROTECTED]> wrote:

> ie.text_field(:name => "test").set "abb",

If you are just hooking onto one attribute use

ie.text_field(:name, "test").set "abb"

for > 1
ie.text_field(:name => "test", :id => "aidy").set "abb"

or

ie.text_field(:name => "test", :index=> 1).set "abb"

or something like that

Aidy



Aidy


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: ERROR installing watir

2008-10-07 Thread Bret Pettichord

Here is some information here about installing Watir from behind a proxy.
http://wiki.openqa.org/display/WTR/Installing+ruby+gems+from+behind+proxy+firewall

Watir now depends on several other gems, so it will be complicated to 
try and download and install them them all locally. You will need to 
find out how to make the Proxy install work. Thousands of other users 
have been able to get this to work, so please be persistent. This is a 
general feature of the Ruby Gem system, and not Watir specific.

Bret

ran_watir wrote:
> I have been perusing the discussion lists to find something related to
> problems installing watir on Windows. Although I did find a lot of
> things, did not see the specific error message I am encountering.
> There was no gem to update and I downloaded the most recent version of
> Ruby I found on their web site. I am behind a firewall that requires
> authentication but setting HTTP_PROXY variable did not help either. I
> am running Windows XP.
>
> Any suggestions?
>
> Thanks in advance.
>
> Ranulfo
>
> D:\>gem install watir
> ERROR:  http://gems.rubyforge.org/ does not appear to be a repository
> ERROR:  could not find gem watir locally or in a repository
>
> D:\>gem update --system
> Updating RubyGems
> Nothing to update
>
> D:\>gem install watir
> ERROR:  http://gems.rubyforge.org/ does not appear to be a repository
> ERROR:  could not find gem watir locally or in a repository
>
> D:\>gem -v
> 1.2.0
>
> >
>   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: if page loading

2008-10-07 Thread Paul Rogers

you should be able to look in the wait method of Watir::IE and see
what we poll for to see if the page is complete. There are 2 poperties
that contain this info, one for the document and one for the window (
frames probably have one per doc)

its called something likie readyStateComplete

Paul

On Tue, Oct 7, 2008 at 9:48 AM, aidy lewis <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Is there anything in the external api that will check to see if the
> page is currently loading?
>
> Aidy
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] if page loading

2008-10-07 Thread aidy lewis

Hi,

Is there anything in the external api that will check to see if the
page is currently loading?

Aidy

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Open-source in test automation

2008-10-07 Thread alex.ikhelis

Hi Zeljko, Pete, Aidy!

Thanks a lot for your replies! These are good references!
To Zeljko: much appreciate your consecutive and useful response.

Just to be on the same page. I was not much clear in my original post.
I have already been watching watir community for 1 year. And now I
have came up that I would like to systematize my theoretical knowledge
from high-level understanding, like: main motivation to open source
test automation, what are the common requirements of building
frameworks, typical tricks and best practices. And then going down to
concrete examples, problem solutions and implementations (where I
already have some experience).

Thank you!

On Oct 7, 4:34 pm, "aidy lewis" <[EMAIL PROTECTED]> wrote:
> alex,
>
> On 07/10/2008, Pete Dignan <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> >  Alex - if you can wait a few months, Watircraft (www.watircraft.com)
> >  is starting work on a framework using RSpec (rspec.info), designed for
> >  use with Watir, that we intend to open-source.  It should be available
> >  in late December or January sometime.  It will be general in nature so
> >  it can be widely applicable.  I hope this helps.
>
> >  Pete
>
> >  On Oct 6, 8:08 am, "alex.ikhelis" <[EMAIL PROTECTED]> wrote:
> >  > Hi skilled!
>
> >  > I would like to systematize my knowledge. Would you suggest some good
> >  > references or your thoughts regarding general ideas and principles of:
> >  > - open-source test automation
> >  > - building open source test automation frameworks
> >  > - watir-based frameworks.
>
> >  > The main point is: key ideas (or main concept) in building open source
> >  > test automation frameworks.
>
> >  > I have not found anything particularly related to such discussion s in
> >  > the group. I believe it might be useful for a lot of people. Thank
> >  > you.
>
> There is a Rspec Story Runner here:
>
> http://wiki.openqa.org/display/WTR/Framework+that+objects+models+AUT
>
> Although I am porting to Cucumber from this.
>
> Aidy
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate the element with node(child node, father node) or directory attributes?

2008-10-07 Thread Alan Baird

You can also locate the parent by using:

object.parent

On Tue, Oct 7, 2008 at 6:55 AM, aidy lewis <[EMAIL PROTECTED]> wrote:
>
>> On Tue, Oct 7, 2008 at 5:16 AM, wesley chen <[EMAIL PROTECTED]> wrote:
>> > When I locate the element A,
>
> anchor = ie.document.getElementByTagName("A")
>
> how can I locate the element close to A with
>> node(child node, father node) or directory attributes?
>>
> anchor.getAttribute("title")
> anchor.getElementByID("purchases")
>
> Or something like that!
>
> Aidy
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: HOW TO IMPROVE THE EFFICIENCY OF DEVELOP THE WATIR CODE

2008-10-07 Thread aidy lewis

On 07/10/2008, bugs apple <[EMAIL PROTECTED]> wrote:
>
> I am very interesting in your code for learning the objects in discovery.rb,
> but it does not work in my machine, and it work well in firewatir.
> Have you the similar method code for the IE watir  to discovery the objects
> on page? Or could you please provide some suggestion so that I can modify it
> for work.
>

I didn't write this; I forgot who did!

But why not leave a comment here

http://90kts.com/blog/2008/just-another-framework-for-developing-watir-test-cases/
?

Aidy

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Open-source in test automation

2008-10-07 Thread aidy lewis

alex,

On 07/10/2008, Pete Dignan <[EMAIL PROTECTED]> wrote:
>
>  Alex - if you can wait a few months, Watircraft (www.watircraft.com)
>  is starting work on a framework using RSpec (rspec.info), designed for
>  use with Watir, that we intend to open-source.  It should be available
>  in late December or January sometime.  It will be general in nature so
>  it can be widely applicable.  I hope this helps.
>
>  Pete
>
>  On Oct 6, 8:08 am, "alex.ikhelis" <[EMAIL PROTECTED]> wrote:
>  > Hi skilled!
>  >
>  > I would like to systematize my knowledge. Would you suggest some good
>  > references or your thoughts regarding general ideas and principles of:
>  > - open-source test automation
>  > - building open source test automation frameworks
>  > - watir-based frameworks.
>  >
>  > The main point is: key ideas (or main concept) in building open source
>  > test automation frameworks.
>  >
>  > I have not found anything particularly related to such discussion s in
>  > the group. I believe it might be useful for a lot of people. Thank
>  > you.
>  >

There is a Rspec Story Runner here:

http://wiki.openqa.org/display/WTR/Framework+that+objects+models+AUT

Although I am porting to Cucumber from this.

Aidy

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Open-source in test automation

2008-10-07 Thread Pete Dignan

Alex - if you can wait a few months, Watircraft (www.watircraft.com)
is starting work on a framework using RSpec (rspec.info), designed for
use with Watir, that we intend to open-source.  It should be available
in late December or January sometime.  It will be general in nature so
it can be widely applicable.  I hope this helps.

Pete

On Oct 6, 8:08 am, "alex.ikhelis" <[EMAIL PROTECTED]> wrote:
> Hi skilled!
>
> I would like to systematize my knowledge. Would you suggest some good
> references or your thoughts regarding general ideas and principles of:
> - open-source test automation
> - building open source test automation frameworks
> - watir-based frameworks.
>
> The main point is: key ideas (or main concept) in building open source
> test automation frameworks.
>
> I have not found anything particularly related to such discussion s in
> the group. I believe it might be useful for a lot of people. Thank
> you.
>
> Kind regards,
> Alex.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: HOW TO IMPROVE THE EFFICIENCY OF DEVELOP THE WATIR CODE

2008-10-07 Thread bugs apple
aidy, thanks a lot.


I am very interesting in your code for learning the objects in discovery.rb,
but it does not work in my machine, and it work well in firewatir.
Have you the similar method code for the IE watir  to discovery the objects
on page? Or could you please provide some suggestion so that I can modify it
for work.


Regards,
-Wiston




2008/10/4 aidy lewis <[EMAIL PROTECTED]>

>
> Hi,
> On 03/10/2008, bugs apple <[EMAIL PROTECTED]> wrote:
> >
> > hi, everyone,
> >
> > At recently days, we decided to make use of watir to implement the
> regession
> > test, instead of the QTP(Quick Test Profesional, produced in HP company),
>
> This is probably one of the best decisions you have made in your life.
>
> > which is the namest and strong bussiness automated test tool for web.
>
> No it is not: It is a heavyweight, resource hungry tool with the best
> results gotten from ignoring all its 'features' and writing in pure
> vbscript files
> that you attach to your project.
>
>
> > Althrough the QTP bring us more benefits,
>
> Could you please explain?
>
> >. The watir is best one choice. Comparing the
> > Object spy tool and the object repositry and its manage in QTP, it seemed
> to
> > us develop the watir code is very slowly.
>
> Once you build up a framework with an application map, things will speed
> up.
>
> > Especially, the developer have to spend much more time to spy the objects
> on page.
>
> You could write some Ruby code that iterates through the objects in
> your page and throws them out somewhere.
> An example is here:
> http://wiki.openqa.org/display/WTR/RSpec+example+with+dynamic+object+repository
> .
>
>
> Aidy
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Bug Fix For Watir 1.5.6

2008-10-07 Thread bugs apple
hi, aidy

For the current version, the watir support the hash data for the multiple
attributes,
but, I fail to execute this statement ie.text_field(:name => "test").set
"abb" when only specify one attribute.
In fact, I want to the hash varible for parameter transferring after package
it as a function and bring more convenience
for the users, do you think?  have a similar way to solve it?


thanks
-Wiston



2008/10/7 aidy lewis <[EMAIL PROTECTED]>

>
> On 07/10/2008, bugs apple <[EMAIL PROTECTED]> wrote:
>
> > ie.text_field(:name => "test").set "abb",
>
> If you are just hooking onto one attribute use
> ie.text_field(:name, "test").set "abb"
>
> for > 1
> ie.text_field(:name => "test", :id => "aidy").set "abb"
>
> or
>
> ie.text_field(:name => "test", :index=> 1).set "abb"
>
> or something like that
>
> Aidy
>
>
>
> Aidy
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Bug Fix For Watir 1.5.6

2008-10-07 Thread aidy lewis

On 07/10/2008, bugs apple <[EMAIL PROTECTED]> wrote:

> ie.text_field(:name => "test").set "abb",

If you are just hooking onto one attribute use
ie.text_field(:name, "test").set "abb"

for > 1
ie.text_field(:name => "test", :id => "aidy").set "abb"

or

ie.text_field(:name => "test", :index=> 1).set "abb"

or something like that

Aidy



Aidy

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate the element with node(child node, father node) or directory attributes?

2008-10-07 Thread aidy lewis

> On Tue, Oct 7, 2008 at 5:16 AM, wesley chen <[EMAIL PROTECTED]> wrote:
> > When I locate the element A,

anchor = ie.document.getElementByTagName("A")

how can I locate the element close to A with
> node(child node, father node) or directory attributes?
>
anchor.getAttribute("title")
anchor.getElementByID("purchases")

Or something like that!

Aidy

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Bug Fix For Watir 1.5.6

2008-10-07 Thread bugs apple
Bret, aidy, and watir developers,

Another questions about the email title, there are two issues below I am
very concern.

a, For the bug ticket in jira, http://jira.openqa.org/browse/WTR-193,  on our
tested system, there are lots of duplicate objects, which are equipped with
the input tag, it seemed for me now to not identify them using the index
attribute, so, i want to know when fix and release it?

b, pls see the script below,
ie=Watir::IE.attach(:title, /QTP/)
ie.text_field(:name => "test").set "abb",
it throws the exception when execute it, in the following version, whether
the object support the hash data structure for "How" or "What"
attributes or not, even if there is only one element(key-value) in hash?
such as:  h=hash.new, h={:name=>"test"}, ie.text_field(h).set "Just a test",

who can give me some tips and I have to solve it for these urgent issues, or
provide some similar ideas ?

 At last, Thanks aidy for your reference about the object repository, and I
feel free to research into it.



2008/10/4 bugs apple <[EMAIL PROTECTED]>

>  hi, everyone,
>
> At recently days, we decided to make use of watir to implement the
> regession test, instead of the QTP(Quick Test Profesional, produced in HP
> company), which is the namest and strong bussiness automated test tool for
> web. Althrough the QTP bring us more benefits, we always look the future and
> work along with the agile script. The watir is best one choice. Comparing
> the Object spy tool and the object repositry and its manage in QTP, it
> seemed to us develop the watir code is very slowly. Especially, the
> developer have to spend much more time to spy the objects on page. For
> example, If the objects is placed in the container, such as the nested
> frames, the coder need to reseach into the object hierarchy and see more the
> object tree map via the MS UI develop tool. Obviously, it is bad thing when
> we meet more container and it takes more time.
>
> So, i want to consult with your guys,
>
> Have any soluations to improve the developing  efficiency?
>
> If I provide the properties for the object like its unique name,  will the
> watir throw the object hierarchy and generated the script automatically?
>
> Someone can share your experiences, or related technology ideas?
> thanks in advance
>
> -Wiston
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate the element with node(child node, father node) or directory attributes?

2008-10-07 Thread Željko Filipin
On Tue, Oct 7, 2008 at 5:16 AM, wesley chen <[EMAIL PROTECTED]> wrote:
> When I locate the element A, how can I locate the element close to A with
node(child node, father node) or directory attributes?

I am pretty sure you can do it with xpath, but I am not good at it. I would
Google for xpath tutorial.

Željko
--
http://watirpodcast.com/bret-pettichord-on-firewatir/

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: ERROR installing watir

2008-10-07 Thread Željko Filipin
On Tue, Oct 7, 2008 at 2:39 AM, Alister Scott <[EMAIL PROTECTED]>
wrote:
> http://wiki.openqa.org/display/WTR/Development+Builds

Alister,

gems at that page are really old. Maybe you should remove them.



Ranulfo,

Download watir from here (and follow Alister's instructions):

http://rubyforge.org/frs/?group_id=104&release_id=22799

Direct link to the newest gem:

http://rubyforge.org/frs/download.php/38130/watir-1.5.6.gem

Željko
--
http://watirpodcast.com/bret-pettichord-on-firewatir/

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby integration with TestLink

2008-10-07 Thread Natasha Ranney
Thanks a bunch for sharing details.
   
  Actually I haven't yet thought about the exact implementation. I have 
recently started using Watir and am maintaining my tests in XLS. But I wanted 
to use any open source test case management tool which helps me organize my 
tests, allows me to execute tests selectively and then generates some reports 
like number of tests cases and test execution results.
   
  I am aware of TestLink, but have never used it exhaustively. Also I knew it 
can be customized as its open source. Hence have been thinking that it may be a 
good option to try out. Now that Manish has given me some pointers, I will 
check it out and get back with some more queries.
   
  Thanks and regards,
  Natasha

Tim Koopmans <[EMAIL PROTECTED]> wrote:
  
Natasha, there's an API already available which you could use as a
client. As Manish has mentioned, it would be relatively simple to
execute test cases. To update, you could just use the sample ruby
client implementation ... Do you have specific functionality in mind
that you're looking to implement? If so, it might be worth mentioning
so some of us can have a hack at it =)

Regards,
Tim Koopmans


#!/usr/bin/env ruby

# Testlink API Sample Ruby Client implementation
require 'xmlrpc/client'

class TestlinkAPIClient
# substitute your server URL Here
SERVER_URL = "http://qa/testlink_sandbox/api/xmlrpc.php";

def initialize(dev_key)
@server = XMLRPC::Client.new2(SERVER_URL)
@devKey = dev_key
end

def reportTCResult(tcid, tpid, status)
args = {"devKey"=>@devKey, "tcid"=>tcid, "tpid"=>tpid,
"status"=>status}
@server.call("tl.reportTCResult", args)
end
end

# substitute your Dev Key Here
client = TestlinkAPIClient.new("f2a979d533cdd9761434bba60a88e4d8")
# Substitute for tcid and tpid that apply to your project
result = client.reportTCResult(1132, 56646, "f")
# Typically you'd want to validate the result here and probably do
something more useful with it
puts "result was: %s" %(result)




   
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby integration with TestLink

2008-10-07 Thread Tim Koopmans

Natasha, there's an API already available which you could use as a
client. As Manish has mentioned, it would be relatively simple to
execute test cases. To update, you could just use the sample ruby
client implementation ... Do you have specific functionality in mind
that you're looking to implement? If so, it might be worth mentioning
so some of us can have a hack at it =)

Regards,
Tim Koopmans


#!/usr/bin/env ruby

# Testlink API Sample Ruby Client implementation
require 'xmlrpc/client'

class TestlinkAPIClient
  # substitute your server URL Here
  SERVER_URL = "http://qa/testlink_sandbox/api/xmlrpc.php";

  def initialize(dev_key)
@server = XMLRPC::Client.new2(SERVER_URL)
@devKey = dev_key
  end

  def reportTCResult(tcid, tpid, status)
args = {"devKey"=>@devKey, "tcid"=>tcid, "tpid"=>tpid,
"status"=>status}
@server.call("tl.reportTCResult", args)
  end
end

# substitute your Dev Key Here
client = TestlinkAPIClient.new("f2a979d533cdd9761434bba60a88e4d8")
# Substitute for tcid and tpid that apply to your project
result = client.reportTCResult(1132, 56646, "f")
# Typically you'd want to validate the result here and probably do
something more useful with it
puts "result was: %s" %(result)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir/Ruby TestManager

2008-10-07 Thread vasu

Hi,

Presently iam aslo working on WATIR but as per our manager we need a
GUI to control. Please share your knowledge with me.

thanks,
vasu

On Sep 3, 11:55 am, Manish Sapariya <[EMAIL PROTECTED]> wrote:
> We use TestLink for managing our tests.http://www.teamst.org/
> We have customized testlink, wehrever necessary, for integration with
> our other test framework.
>
> Regarding GUI testing, I am not satisfied with any of the tools that
> I tried so far,
>
> Autoit,
> Ruby GUITest library
> Variant of accessing COM using ruby
>
> We are evaluatinghttp://www.codeplex.com/whitetool written in C#.
> I am looking forward to access the automation api from Ruby, its work
> in progress. So far whatever we have been able to automate our own
> C# .Net based client, but all the automation code is also in C#.
>
> Just to complete story, cruisecontrol.rb is working like charm for
> our CI processes.
>
> To summarize,
> Watir/FireWatire + Testlink + CruiseControl.rb + our own framework
> works like charm for us.
>
> Hope this helps.
> Regards,
> Manish
>
> Alex Collins wrote:
> > I would second the thoughts of Nathan's email. A large project I  
> > worked on replaced Rational Robot tests with Watir.
>
> > I've also written a framework around Watir (code generation of Watir  
> > code) and used this successfully on several projects with a variety of  
> > tester skill levels. Always having the ability to fall back to Watir  
> > code when necessary, or Ruby if I need more automation or power is  
> > wonderful.
>
> > Once you have a good grasp of both Watir and Ruby, you are on to a  
> > winner.
>
> > I've also implemented a test management app in Rails.
>
> > Sadly, I cannot release the code to these.
>
> > If you would be prepared to pay for an test management app, invest  
> > instead in your own staff's skills. Learn a little ruby on rails  
> > (peepcode.com and railscasts.com were great for me, plus the advanced  
> > rails recipes book) and write one. If you can convince your company to  
> > open source it (I failed) I imagine you'd quite likely get others  
> > involved and get your company a better application.
>
> > With the web / non-web issue, I would probably look for a different  
> > solution that is really good for GUI apps. You don't use a metal saw  
> > to cut wood - it is the wrong specialised tool for the job. Use the  
> > best tool and ensure you can get the results into open formats you can  
> > process. It is easier to teach people two tools that do the job well  
> > than it is to teach one tool which does both jobs very poorly.
>
> > On 2 Sep 2008, at 20:56, "Nathan Lane" <[EMAIL PROTECTED]> wrote:
>
> >> Just to get you started, sadly I don't know of any test managers for  
> >> Watir, but my own QA department (me and my supervisor) were working  
> >> on both a PHP-based and a Rails-based web application to take care  
> >> of the front end. In the process I built a tool that manages when  
> >> tests run and uses a database to store test data, tests, and  
> >> logging. It consisted of two parts, the database and a client that  
> >> runs continually on all systems running tests. Ideally there would  
> >> be a third part (server or controller) and the client would be  
> >> simpler. But it never fully matured. I still have the source code  
> >> and now own the project which means I can contue to work on it  
> >> during work and provide it outside of work as an unbranded open  
> >> source tool.
>
> >> As far as GUI testing goes, Ruby itself has the ability to connect  
> >> to any COM or OLE (and COM-/OLE-like) object. That means for  
> >> OpenOffice.org it connects to UNO, for .NET applications it uses  
> >> something similar to COM (provided the app registers itself as COM  
> >> operable), for Internet Explorer and Microsoft Office it uses either  
> >> COM or .NET. There are frameworks built on Ruby to automate many  
> >> common applications, but if you're working on internal applications  
> >> then it may not work out-of-the-box. Nonetheless, Ruby is powerful  
> >> enough to be used as an automation tool in many aspects. Don't give  
> >> up and don't let your boss tell you "you get what you pay for". We  
> >> used to license Mercury (now HP) QuickTest Professional for  
> >> something like $3,000 a year for four licenses and Quality Center  
> >> server application. We were able to write numerous creative a stable  
> >> tests for our web applications -- it's only half that good for  
> >> anything that isn't Internet Explorer, Microsoft Office, or COM-
> >> based...doesn't work well with .NET or Java, and it's terrible with  
> >> Firefox 1.5, 2.0, or 3. Basically it just doesn't work. And there is  
> >> no planned support for other browsers with HP QTP. Also we were  
> >> supposedly paying for service and support, and we've had to sit on  
> >> the phone for eight hours at a time to get even the smallest bit of  
> >> help from anybody that HP outsources. So I'd say

[wtr-general] Re: Need help with input type : p (paragraph)

2008-10-07 Thread Natasha Ranney
Hey Paul,
   
  It worked :)
   
  I just tried simulating it in a way things happen manually. I had actually 
tried the same thing yesterday, but was accessing the element by wrong method.
   
  So, following is what worked for me:
   
  $ie.p(:id,"pTypeHint").span(:index,"1").click
 $ie.text_field(:id,"txtLine1").set("Testing template postcardFooter\n Using 
blue color\n using center align \n Using New baby icon")
 
   $ie.p(:id,"pFooterHint").span(:index,"1").click
 $ie.text_field(:id,"txtLine2").set("Testing footer")
 
Thanks,
  Natasha
Paul Rogers <[EMAIL PROTECTED]> wrote:
  
this type of thing is quite common. What I think is happening is that
the textfield is not displayed, and the p is displayed so the text can
be styled better. Ive never worked on ine of these before, so can only
speculate on whats happening. If you can, Id work with one of your
developers to see what they are doing.

When you say it doesnt work - can you elaborate on what happens - is
there an exception etc?

Paul

On Mon, Oct 6, 2008 at 11:11 AM, Natasha wrote:
>
> Hi All,
>
> I need some help with 'p' input type.
>
> I have 2 snippets of html code, for 2 inputs:
>
> 1.
> --
>   
>   > class="postcard">
>   > style="overflow:hidden;color: #00;text-align:left;">

> > cols="36" wrap="hard" class="fonthelvetica" rows="17" maxlength="392"> 
> > style="background-color:#;text-align:left;color:#00; ">
>   
> Click here to add
> text
> 

> (ignore to leave blank)
> 

> 
> save
> 
> 
> 

> ---
>
> 2.
> ---
>   
>
> > style="display:none;" alt="" />
>
>
>   

>
> > rows="3" wrap="hard" maxlength="150" style="background-color:#;text-> 
> > align:left;color:#;">
>   
> 
> Click here to add footer text
> 

> (ignore to leave blank)
> 

> 
> save
> 
> 
> ---
>
> I need to set value in the text area. But it fails using the following
> code:
>
> $ie.text_field(:id,"txtLine1").set("Testing template")
>
> I also tried the following:
>
> $ie.p(:id,"pLine1").span(:index,"1").click
> $ie.text_field(:id,"txtLine1").set("Testing template")
>
> Questions:
>
> 1. Can I set the value for paragragh directly?
> [$ie.p(:id,"pFooterHint").set("test") ]
>
> Please could you suggest something looking at the above code.
>
> Thanks and regards,
> Natasha Natasha
> >
>






   
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby integration with TestLink

2008-10-07 Thread Alister Scott

Hi Manish,

If you have time, it would be great if you could share your solution
you talk about on a wiki page.
You can create a page with the example under:
http://wiki.openqa.org/display/WTR/Advanced+Examples
Screenshots would be good too.

Regards,
Alister Scott

On Oct 7, 4:26 pm, Manish Sapariya <[EMAIL PROTECTED]> wrote:
> Hi Natasha,
> We have developed a patch and contributed to testlink, which can run
> a test from testlink.
>
> Please note that this just enables you to RUN the tests, not write and
> maintain them. Please read on for details. This might be little off
> topic but I think it might be still useful to others.
>
> The idea is simple. We have small CSV based test execution framework
> around watir, which exposes all the tests using xml rpc server.
>
> One needs to write a test cases in testlink such that the name of
> testcase is exactly the name of test api in the framework. The patched
> testlink provides a execute button, pressing which simply invokes
> the test case using xmlrpc call. There will also be a execute complete
> test plan in this way.
>
> The testlink patch is already in the trunk and is enabled by some
> config variable, I don't remember the exact name.
>
> This is very simple and straight forward integration that we have
> tried, but it works for us.
>
> You may achieve the same thing by writing simple xmlrpc server
> execution engine for your test cases. Best thing would be a
> xmlrpc based runner for runit/testunit. :-)
>
> Please do let me know if you need more details.
> Regards,
> Manish
>
> Natasha wrote:
> > Hello All,
>
> > Has any tried integrating TestLink with Watir? Basically executing
> > watir tests through Testlink.
>
> > If yes, please could you share details about complexity of doing the
> > integration.
>
> > If not TestLink, is there any easy integration/support available for
> > any other opensource Test case management tool?
>
> > Thanks,
> > Natasha
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---