[wtr-general] Re: Automating a File uploader popup

2009-06-18 Thread Natasha Ranney
Hey orde,

You are right. There is an object tag associated with it and that button is a 
Flash implementation.

I have come across that we have flash supported extension for watir flashwatir. 
Just was wondering if its useable. 
Or is there an alternative solution like using some windowsole api to handle 
this.

Thanks,
Natasha





From: orde 
To: Watir General 
Sent: Thursday, 18 June, 2009 1:33:32
Subject: [wtr-general] Re: Automating a File uploader popup


Hi Natasha (and all)--

This might be OT, but I'll throw it out there because you mentioned
flash a couple of times in this thread.

Is there an  tag associated with the page element that you're
trying to access?  If you right-click on the page element using
Firefox, do you see an overlay about "About Adobe Flash Player"?

If so, my understanding is that out-of-the-box watir doesn't support
flash, so the above solutions won't necessarily work.

Hope that helps...

orde


  
--~--~-~--~~~---~--~~
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 a File uploader popup

2009-06-17 Thread Natasha Ranney
Thanks for the pointer. Unfortunately I tried to automate the click event for 
the span and it didn't popup the upload file window.

I saw that watir identified the button and even clicked it, but nothing 
happened. But when I try to do the same manually it works fine.

Source code for the page under test:



Upload your images to 
MOO



Watir command executed:

#$ie.span(:id,"spnUploadButton").fire_event("OnMouseDown")
  #$ie.span(:id,"spnUploadButton").fire_event("OnMouseUp")
$ie.span(:id,"spnUploadButton").click

NOTE: I tried both click method as well as fire_events. None worked.

Thanks,
Natasha





From: al3kc 
To: Watir General 
Sent: Wednesday, 17 June, 2009 9:17:37
Subject: [wtr-general] Re: Automating a File uploader popup


Watir use AutoIt For file uploading. set method for file_field looks
like

def set(setPath)
  assert_exists
  require 'watir/windowhelper'
  WindowHelper.check_autoit_installed
  begin
thrd = Thread.new do
  system("rubyw -e \"require 'win32ole'; @autoit=WIN32OLE.new
('AutoItX3.Control'); waitresu...@autoit.winwait 'Choose file', '',
15; sleep 1; if waitresult == 1\" -e \"@autoit.ControlSetText 'Choose
file', '', 'Edit1', '#{setPath}'; @autoit.ControlSend 'Choose file',
'', 'Button2', '{ENTER}';\" -e \"end\"")
end
  thrd.join(1)
  rescue
raise Watir::Exception::WatirException, "Problem accessing
Choose file dialog"
  end
  click
end

You can try to invoke this autoit code after clicking the span or
rewrite this method for Span class


  
--~--~-~--~~~---~--~~
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 a File uploader popup

2009-06-16 Thread Natasha Ranney
Hi

Thanks for the pointer. 

Unfortunately I don't think it will help, as it looks for HTML tag  :(

But following is the piece of code that invokes the popup in my case:





Upload your images to MOO





And the above is using a Flash method to invoke File uploader.
Thanks,
Natasha





From: Željko Filipin 
To: watir-general@googlegroups.com
Sent: Tuesday, 16 June, 2009 12:46:15
Subject: [wtr-general] Re: Automating a File uploader popup

On Tue, Jun 16, 2009 at 10:47 AM, Natasha  wrote:
> One of the links on our company website invokes a file uploader popup
> window.

This does not work?

http://wiki.openqa.org/display/WTR/File+Uploads

Ž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: Saving xml contents of a page shown on screen

2009-05-19 Thread Natasha Ranney
Thanks Željko :)

The href attribute worked fine.

Regards,
Natasha





From: Željko Filipin 
To: watir-general@googlegroups.com
Sent: Tuesday, 19 May, 2009 11:30:30
Subject: [wtr-general] Re: Saving xml contents of a page shown on screen

On Tue, May 19, 2009 at 12:01 PM, Natasha Ranney  wrote:
> I tried using text property of browser to save the text shown on page as xml 
> file. It did save it. But it saved the '-' as well.

I remember doing the same thing a long time ago, and being annoyed by `-` also. 
I am not sure how I solved the problem. Maybe if you open the page in Firefox, 
there is no `-`.

> xmlurl = $ie.link(:text,"test").url

Try:

xmlurl = $ie.link(:text,"test").href

but I am surprised that `url` does not work.

Ž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: Saving xml contents of a page shown on screen

2009-05-19 Thread Natasha Ranney
Hey Alex,

Thanks for the inputs.

Unfortunately that didn't help me :(.

Basically, when I view the page it simply has an xml file opened and its 
contents look something like this:

 

  - 
 23233
 ksjdksjdk 





I tried using text property of browser to save the text shown on page as xml 
file. It did save it. But it saved the '-' as well. That became a bit clumpsy.
The xml file is huge and hence its good to save the page as an xml file. Thats 
what I do manually.

Also is there a way in which I can grab the URL of a link on a page. I tried 
the following:

xmlurl = $ie.link(:text,"test").url

But it failed, saying that url is not valid method.

Thanks,
Natasha



From: Alex Collins 
To: watir-general@googlegroups.com
Sent: Monday, 18 May, 2009 20:05:24
Subject: [wtr-general] Re: Saving xml contents of a page shown on screen


Natasha,

This is where you need to use a little natural Ruby. For example:

filename = 'output.xml'
File.open(filename, 'w').write browser.html

Another useful style is:

File.open(filename, 'w') do |output|
output.puts "Whatever I want to put in the file."
end

Hope this helps.

Alex

On 18 May 2009, at 18:46, Natasha wrote:

>
> Hello All,
>
> Apologies for an unambiguous subject line.
>
> Following is a scenario in my test:
>
> 1. On a particular page, we have a hyperlink.
> 2. When you click on that hyperlink, it opens up an XML document in
> the same window
> 3. I wanted to copy the contents and save that XML file on disk. I can
> do that manually by clicking on File menu option of the browser and
> selecting Save As option.
>
> Is there a way I can manully save the output of the entire page as an
> XML file?
>
> 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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir users: What is your role at work?

2009-03-16 Thread Natasha Ranney
Hi All,

I have been into testing for about 6 years. My testing experience has mostly 
been into testing on unix platforms and C-Api testing.

My current job is around testing of a website. Hence this is the first time I 
started looking out for automated test tools for website automation. 
This is how I got to learn about Watir and I enjoy working with Watir. So far I 
have used Perl and Ruby is quite similar to Perl.

Manual testing can become monotonous and hence doing automation using Watir 
makes the job interesting.

Cheers,
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Where to hold public training?

2009-02-13 Thread Natasha Ranney
I have just joined the linked in group. Thanks for sharing. Wasn't aware of it 
till date.

--- On Fri, 13/2/09, aidy lewis  wrote:
From: aidy lewis 
Subject: [wtr-general] Re: Where to hold public training?
To: watir-general@googlegroups.com
Date: Friday, 13 February, 2009, 3:57 PM

Good: If anyone is in LinkeIn, could you ask the other 15 as well.

If we get enough interest, I could create a site.

Aidy


On 13/02/2009, JArkelen  wrote:
>
>  Hi Aidy,
>
>  I would be interested in creating a user group.
>  Although I am based in The Netherlands, as a Charlton Athletic
>  supporter I am in London quite frequently :-)
>
>  On Feb 13, 11:13 am, aidy lewis  wrote:
>  > Natasha,
>  >
>  > I am based in London: if we could get 5 or 6 people we could form a
>  > user-group.
>  >
>  > But there is also LRUG:  http://lrug.org/
>  >
>  > Aidy
>
> >
>  > On 13/02/2009, Natasha Ranney  wrote:
>  >
>  >
>  >
>  > > Is it possible to have some in London?
>  >
>  > > Not sure if there are any Watir users in London.
>  >
>  > > Thanks,
>  > > Natasha
>  >
>  > > --- On *Fri, 13/2/09, niartseoj *
wrote:
>  >
>  > > From: niartseoj 
>  > > Subject: [wtr-general] Re: Where to hold public training?
>  > > To: "Watir General"

>  > > Date: Friday, 13 February, 2009, 4:53 AM
>  >
>  > > how about Washington DC? or someplace off GREEN BELT turnpike
in
>  > > Reston Virginia
>  > > bring the show to the east  PLEASE
>  >
>  > > On Feb 12, 5:57 pm, Pete Dignan 
wrote:
>  > > > The first public training class on Watir (including the
new WatirCraft
>  > > > framework) is March 25-26 in Austin TX.  We're
>  > >  discussing where to
>  > > > hold additional public classes after that.  Portland OR
has been
>  > > > mentioned.  Bay Area?  Chicagoland?  We're looking for
suggestions
>  > > > based on need.
>  >
>  > > > Pete
>  >
>





  
--~--~-~--~~~---~--~~
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: Where to hold public training?

2009-02-13 Thread Natasha Ranney
Thats Great :)

I am aware of LRUG. Just have attended one of its session. But have found that 
they have ruby-related discussions more, as compared to Watir and testing. So 
its good to be part of a group that focusses on these aspects. Though knowing 
more about Ruby does help :)

Cheers,
Natasha

--- On Fri, 13/2/09, aidy lewis  wrote:
From: aidy lewis 
Subject: [wtr-general] Re: Where to hold public training?
To: watir-general@googlegroups.com
Date: Friday, 13 February, 2009, 3:43 PM

Natasha,I am based in London: if we could get 5 or 6 people we could form a 
user-group.
But there is also LRUG:  http://lrug.org/Aidy
On 13/02/2009, Natasha Ranney  wrote:
Is it possible to have some in London?

Not sure if there are any Watir users in London.

Thanks,
Natasha


--- On Fri, 13/2/09, niartseoj  wrote:

From: niartseoj 
Subject: [wtr-general] Re: Where to hold public training?
To: "Watir General" 

Date: Friday, 13 February, 2009, 4:53 AM

how about Washington DC? or someplace off GREEN BELT turnpike in
Reston Virginia
bring the show to the east  PLEASE


On Feb 12, 5:57 pm, Pete Dignan  wrote:
> The first public training class on Watir (including the new WatirCraft

> framework) is March 25-26 in Austin TX.  We're
 discussing where to
> hold additional public classes after that.  Portland OR has been
> mentioned.  Bay Area?  Chicagoland?  We're looking for suggestions
> based on need.
>
> Pete




 













  
--~--~-~--~~~---~--~~
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: Where to hold public training?

2009-02-13 Thread Natasha Ranney
Is it possible to have some in London?

Not sure if there are any Watir users in London.

Thanks,
Natasha

--- On Fri, 13/2/09, niartseoj  wrote:
From: niartseoj 
Subject: [wtr-general] Re: Where to hold public training?
To: "Watir General" 
Date: Friday, 13 February, 2009, 4:53 AM

how about Washington DC? or someplace off GREEN BELT turnpike in
Reston Virginia
bring the show to the east  PLEASE

On Feb 12, 5:57 pm, Pete Dignan  wrote:
> The first public training class on Watir (including the new WatirCraft
> framework) is March 25-26 in Austin TX.  We're discussing where to
> hold additional public classes after that.  Portland OR has been
> mentioned.  Bay Area?  Chicagoland?  We're looking for suggestions
> based on need.
>
> Pete




  
--~--~-~--~~~---~--~~
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: Unable to install WATIR on VM client machine

2009-02-04 Thread Natasha Ranney
Hi Aidy,

That worked :). I just tried executing a very simple Ruby script.

Let me try executing my actual test scripts.

Thanks a lot,
Natasha

--- On Wed, 4/2/09, aidy lewis  wrote:
From: aidy lewis 
Subject: [wtr-general] Re: Unable to install WATIR on VM client machine
To: watir-general@googlegroups.com
Date: Wednesday, 4 February, 2009, 11:06 PM

Hi Natasha,

I think the consesus was to copy over the whole Ruby folder.

Aidy

2009/2/4 Natasha Ranney :
> I also tried copying the entire gems folder from the machine where
> ruby+watir was installed, onto the VM client machine. Then tried executing
> the watir script, but it failed to execute.
>
> Let me try installing the gems one by one, after downloading the gems.
>
> --- On Wed, 4/2/09, Natasha Ranney  wrote:
>
> From: Natasha Ranney 
> Subject: [wtr-general] Re: Unable to install WATIR on VM client machine
> To: watir-general@googlegroups.com
> Date: Wednesday, 4 February, 2009, 10:50 PM
>
> I have tried copy the gem that Watir wants, Activesupport.
>
> copied
C:\ruby\lib\ruby\gems\1.8\gems\activesupport-2.2.2
to the VM machine.
> Ruby is already installed on that machine.
>
> After copying the gem, I also set the path on VM machine, as shown below:
>

> C:\Installables>echo %PATH%
>
c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ruby\lib\
> ruby\gems\1.8\gems\
>
> C:\Installables>gem install -l watir
> ERROR:  While executing gem ... (RuntimeError)
> Error instaling watir:
> watir requires activesupport >= 0
>
> C:\Installables>dir
C:\ruby\lib\ruby\gems\1.8\gems\activesupport-2.2.2
>  Volume in drive C has no label.
>  Volume Serial Number is 8C0E-0BA2
>
>  Directory of
C:\ruby\lib\ruby\gems\1.8\gems\activesupport-2.2.2
>
> 02/04/2009  05:18 PM  .
> 02/04/2009  05:18 PM  ..
> 02/04/2009  05:18 PM61,344 CHANGELOG
> 02/04/2009  05:18 PM  lib
> 02/04/2009  05:18 PM 1,397 README
>2 File(s) 62,741 bytes
>3 Dir(s)  62,439,129,088 bytes free
>
> C:\Installables>
>

>
> Thanks,
> Natasha
>
> --- On Wed, 4/2/09, Paul Rogers  wrote:
>
> From: Paul Rogers 
> Subject: [wtr-general] Re: Unable to install WATIR on VM client machine
> To: watir-general@googlegroups.com
> Date: Wednesday, 4 February, 2009, 9:44 PM
>
> as long as you set the env variables to point to the ruby executable,
> gems etc it should be fine. I guy I used to work with wanted to check
> the whole ruby tree in to svn along with a batch file to set the env
> vars so it was really easy to set up a new machine.
>
> Paul
>
> On Wed, Feb 4, 2009 at 9:03 AM, Bret Pettichord
>
>  
> wrote:
>>
>> it is possible to simply copy over your ruby directory after you have
>> installed watir on another machine. i've done this.
>>
>> bret
>>
>> aidy lewis wrote:
>>> Good point. Not sure if you can just copy over your gem folder.
>>>
>>> Or create the VM after you have installed your test environment
>>>
>>> Aidy
>>>
>>> 2009/2/4 Natasha :
>>>
>>>> Thanks Aidy.
>>>>
>>>> I have tried doing that. Its keeps prompting me to install
other
> gems
>>>> first.
>>>>
>>>> Its asking me to install activesupport gem. I have been
looking
> for
>>>> that gem.
>>>>
>>>> Regards,
>>>> Natasha
>>>>
>>>> On Feb 4, 3:04 pm, aidy lewis
>
>  
> wrote:
>>>>
>>>>> Try downloading the packaged gem and place on C:
>>>>>
>>>>> C:> gem install -l watir
>>>>>
>>>>> 2009/2/4 Natasha :
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I am having trouble installing WATIR on VM client
machine.
>>>>>>
>>>>>> I have installed Ruby on the VM client machine. Now I
have
> been trying
>>>>>> to install Watir on it.
>>>>>>
>>>>>> I tried commands:
>>>>>>
>>>>>> gem update --system
>>>>>>
>>>>>> It simply hangs while executing the above command.
>>>>>>
>>>>>>
>
>  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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Unable to install WATIR on VM client machine

2009-02-04 Thread Natasha Ranney
I also tried copying the entire gems folder from the machine where ruby+watir 
was installed, onto the VM client machine. Then tried executing the watir 
script, but it failed to execute.

Let me try installing the gems one by one, after downloading the gems.

--- On Wed, 4/2/09, Natasha Ranney  wrote:
From: Natasha Ranney 
Subject: [wtr-general] Re: Unable to install WATIR on VM client machine
To: watir-general@googlegroups.com
Date: Wednesday, 4 February, 2009, 10:50 PM

I have tried copy the gem that Watir wants, Activesupport.

copied C:\ruby\lib\ruby\gems\1.8\gems\activesupport-2.2.2 to the VM machine.
Ruby is already installed on that machine.

After copying the gem, I also set the path on VM machine, as shown below:

C:\Installables>echo %PATH%
c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ruby\lib\
ruby\gems\1.8\gems\

C:\Installables>gem install -l watir
ERROR:  While executing gem ... (RuntimeError)
    Error instaling watir:
    watir requires activesupport >= 0

C:\Installables>dir C:\ruby\lib\ruby\gems\1.8\gems\activesupport-2.2.2
 Volume in drive C has no
 label.
 Volume Serial Number is 8C0E-0BA2

 Directory of C:\ruby\lib\ruby\gems\1.8\gems\activesupport-2.2.2

02/04/2009  05:18 PM      .
02/04/2009  05:18 PM      ..
02/04/2009  05:18 PM    61,344 CHANGELOG
02/04/2009  05:18 PM      lib
02/04/2009  05:18 PM 1,397 README
   2 File(s) 62,741 bytes
   3 Dir(s) 
 62,439,129,088 bytes free

C:\Installables>


Thanks,
Natasha

--- On Wed, 4/2/09, Paul Rogers  wrote:
From: Paul Rogers 
Subject: [wtr-general] Re: Unable to install WATIR on VM client machine
To: watir-general@googlegroups.com
Date: Wednesday, 4 February, 2009, 9:44 PM

as long as you set the env variables to point to the ruby executable,
gems etc it should be fine. I guy I used to work with wanted to check
the whole ruby tree in to svn along with a batch file to set the env
vars so it was really easy to set up a new machine.

Paul

On Wed, Feb 4, 2009 at 9:03 AM, Bret Pettichord
 
wrote:
>
> it is possible to simply copy over your ruby directory after you have
> installed watir on another machine. i've done this.
>
> bret
>
> aidy lewis wrote:
>> Good point. Not sure if you can just copy over your gem folder.
>>
>> Or create the VM after you have installed your test environment
>>
>> Aidy
>>
>> 2009/2/4 Natasha :
>>
>>> Thanks Aidy.
>>>
>>> I have tried doing that. Its keeps prompting me to install other
gems
>>> first.
>>>
>>> Its asking me to install activesupport gem. I have been looking
for
>>> that gem.
>>>
>>> Regards,
>>> Natasha
>>>
>>> On Feb 4, 3:04 pm, aidy lewis
 
wrote:
>>>
>>>> Try downloading the packaged gem and place on C:
>>>>
>>>> C:> gem install -l watir
>>>>
>>>> 2009/2/4 Natasha :
>>>>
>>>>
>>>>
>>>>
>>>>> Hi All,
>>>>>
>>>>> I am having trouble installing WATIR on VM client machine.
>>>>>
>>>>> I have installed Ruby on the VM client machine. Now I have
been trying
>>>>> to install Watir on it.
>>>>>
>>>>> I tried commands:
>>>>>
>>>>> gem update --system
>>>>>
>>>>> It simply hangs while executing the above command.
>>>>>
>>>>>
 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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Unable to install WATIR on VM client machine

2009-02-04 Thread Natasha Ranney
I have tried copy the gem that Watir wants, Activesupport.

copied C:\ruby\lib\ruby\gems\1.8\gems\activesupport-2.2.2 to the VM machine.
Ruby is already installed on that machine.

After copying the gem, I also set the path on VM machine, as shown below:

C:\Installables>echo %PATH%
c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ruby\lib\
ruby\gems\1.8\gems\

C:\Installables>gem install -l watir
ERROR:  While executing gem ... (RuntimeError)
    Error instaling watir:
    watir requires activesupport >= 0

C:\Installables>dir C:\ruby\lib\ruby\gems\1.8\gems\activesupport-2.2.2
 Volume in drive C has no label.
 Volume Serial Number is 8C0E-0BA2

 Directory of C:\ruby\lib\ruby\gems\1.8\gems\activesupport-2.2.2

02/04/2009  05:18 PM      .
02/04/2009  05:18 PM      ..
02/04/2009  05:18 PM    61,344 CHANGELOG
02/04/2009  05:18 PM      lib
02/04/2009  05:18 PM 1,397 README
   2 File(s) 62,741 bytes
   3 Dir(s)  62,439,129,088 bytes free

C:\Installables>


Thanks,
Natasha

--- On Wed, 4/2/09, Paul Rogers  wrote:
From: Paul Rogers 
Subject: [wtr-general] Re: Unable to install WATIR on VM client machine
To: watir-general@googlegroups.com
Date: Wednesday, 4 February, 2009, 9:44 PM

as long as you set the env variables to point to the ruby executable,
gems etc it should be fine. I guy I used to work with wanted to check
the whole ruby tree in to svn along with a batch file to set the env
vars so it was really easy to set up a new machine.

Paul

On Wed, Feb 4, 2009 at 9:03 AM, Bret Pettichord 
wrote:
>
> it is possible to simply copy over your ruby directory after you have
> installed watir on another machine. i've done this.
>
> bret
>
> aidy lewis wrote:
>> Good point. Not sure if you can just copy over your gem folder.
>>
>> Or create the VM after you have installed your test environment
>>
>> Aidy
>>
>> 2009/2/4 Natasha :
>>
>>> Thanks Aidy.
>>>
>>> I have tried doing that. Its keeps prompting me to install other
gems
>>> first.
>>>
>>> Its asking me to install activesupport gem. I have been looking
for
>>> that gem.
>>>
>>> Regards,
>>> Natasha
>>>
>>> On Feb 4, 3:04 pm, aidy lewis 
wrote:
>>>
 Try downloading the packaged gem and place on C:

 C:> gem install -l watir

 2009/2/4 Natasha :




> Hi All,
>
> I am having trouble installing WATIR on VM client machine.
>
> I have installed Ruby on the VM client machine. Now I have
been trying
> to install Watir on it.
>
> I tried commands:
>
> gem update --system
>
> It simply hangs while executing the above command.
>
> 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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Need to access the first LI element within an UL element

2008-12-12 Thread Natasha Ranney
Thanks Bret. It worked :)

Regards,
Natasha

Bret Pettichord  wrote: 
/Signed in as (.*)/.match(browser.ul(:id, 'ulInfoLinks').li(:index, 
1).text)[1]

Natasha wrote:
> Hi All,
>
> I want to access the value of the LI element, which is within an UL
> element.
>
> Following is the HTML structure:
>
> 
>   
   
>  Signed in as  username 
>   
>  
 
> 

>
> Basically I want to retrieve the name of the user that is logged in.
>
> 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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Unable to execute assert method through Module

2008-11-28 Thread Natasha Ranney
Thanks Aidy. Somehow its started working again.
   
  I took a old version of my working test scripts and merged them. So far so 
good :)
   
  Regards,
  Natasha

aidy lewis <[EMAIL PROTECTED]> wrote:
  
Natasha,

Try putting this include in your module

include Test::Unit::Assertions

Bret wrote around this topic some time ago

http://www.io.com/~wazmo/blog/archives/2006_05.html#000238

Aidy


On 28/11/2008, Natasha wrote:
>
> Hello All,
>
> I am unable to call the assert method through a Module.
> I am able to execute the same statement through test function.
>
> I am going to paste the code of Test function and Module. The assert
> statement executes successfully when called through the test function.
> But fails when its part of a module function. I am invoking the module
> function through the test case function. I tried reinstalling ruby and
> watir. But its still failing. I tried various changes, but nothing
> worked. I tried invoking the assert method from Module function using
> 'Test::Unit::Assertions.assert()'
>
> I need help here. I have loads of assert statements in my module and
> somehow want to get this working.
>
>
> Test Function code:
> ---
> require 'watir'
> require 'test/unit'
>
> module NewTest
>
> def asserttest
>
> puts "\n Hello testing assert through module"
>
> assert(1==1, "false")
>
>
> puts 'assert succeeded'
>
> end
>
> end
> ---
>
> Module:
> ---
> require 'watir'
> require 'test/unit'
>
> require 'NewTest'
>
> include NewTest
>
> class Moduletest < Test::Unit::TestCase
>
> def test_a_orderPlacement
>
> puts "\nCalling assert from test function"
> assert(1 ==1,"failed assertion")
> puts "Assert call succeeded\n\n"
>
> puts "Calling assert method from module method"
> NewTest.asserttest()
> puts "\n Called module method successfully\n\n"
>
> end
>
> end
> ---
>
> 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
-~--~~~~--~~--~--~---



[wtr-general] Re: Help required : Ruby code error

2008-11-27 Thread Natasha Ranney
Hi Aidy,

Thanks for sharing the list of editors. I have just installed NetBeans and it 
looks good.

Also I had posted one more query in my last email. Please could you help me 
with that, whenever you get a chance.

Regards,
Natasha

aidy lewis <[EMAIL PROTECTED]> wrote: 
Hi Natasha,

Below is a list of editors

On 27/11/2008, Natasha Ranney  wrote:
> Hi Aidy/Charley/John,
>
> I am using Notepad to write my scripts and at times I use SciTE.

Open-Source\Free Software

* Netbeans Ruby: http://www.netbeans.org/downloads/index.html

* Aptana Radrails: http://www.aptana.com/rails

* Vim: http://www.vim.org/download.php#pc

* Emacs: http://www.gnu.org/software/emacs/windows/Getting-Emacs.html

Proprietary

* Ruby in Steel for Visual Studio: http://www.sapphiresteel.com/

* Jetbrains Rubymine: http://www.jetbrains.com/ruby/index.html

TEXT EDITORS (with out-of-the-box Ruby Syntax highlighting)

Open-Source

* Notepad++: 
http://sourceforge.net/project/showfiles.php?group_id=95717&package_id=102072

* Komodo Edit: 
http://www.activestate.com/store/productdetail.aspx?prdGuid=20f4ed15-6684-4118-a78b-d37ff4058c5f

Proprietary

* E text editor: http://www.e-texteditor.com/
Not logged in. Log in

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: Help required : Ruby code error

2008-11-27 Thread Natasha Ranney
A Note to my last mail:

The program which invokes the module's method has a statement (which calls 
assert method). That gets executed if its part of the test program, but not 
when its part of the Login module. Not sure why. How is it different to work 
successfully, when invoked through the caller program.

Thanks,
Natasha

Natasha Ranney <[EMAIL PROTECTED]> wrote: Hi Aidy/Charley/John,

Thanks for helping me out :). It was such a stupid typo.

I am using Notepad to write my scripts and at times I use SciTE.

Now I am getting one more issue and am not understanding the reason for it. It 
was working last week. I extended it and created more modules.

I am getting an error:
NoMethodError: undefined method `assert' for Login:Module

I have attached Login module and a test program that invokes its signin method.

Thanks again,
Natasha

aidy lewis <[EMAIL PROTECTED]> wrote: 
Natasha,

Lower case you 'I' in 'If'

Also dont underscore your module names.

What editor you using?

Aidy

On 26/11/2008, Natasha  wrote:
>
>  Hi All,
>
>  Please could you help me understand the fix for  a syntax error in the
>  following code:
>
>  
> 
>  require 'watir'   # the controller
>  require 'test/unit'
>
>  module UpsellPage_Sticker
>
>  def SelectQuantity(qty)
> If qty > 0 and qty <=5
> # assert
> begin
> 
> assert($ie.select_list(:id,"ddlQuantity").includes?(/#{qty}
>  pack/),"No option for #{qty} " + $ie.url)
> puts 'UpsellPage_Sticker :: SelectQuantity - 
> Assertion passed'
>
> rescue StandardError => ex
> print "\n\nUpsellPage_Sticker :: SelectQuantity => " 
> + ex + "\n\n"
> raise
> $ie.close
> end
>
> #  execute
>
> $ie.select_list(:id,"ddlQuantity").select_value(/#{qty} pack/)
> puts "UpsellPage_Sticker:: SelectQuantity - #{qty} qty 
> selected on
>  Upsell Page \n"
> end
>
>  end
>  end  # end of module
>
>  
> 
>
>  If I remove IF construct from the method, it works fine. Other wise it
>  gives an error " syntax error, unexpected kEND, expecting $end
>  (SyntaxError)". Am I missing something here?
>
>  Please help me.
>
>  Thanks,
>
> Natasha
>  >
>


  
 require 'watir'   # the controller
require 'test/unit' 

module Login

def signin(user,password)


  begin
# assert
assert($ie.text_field(:id,"txtLogin").exists?)
assert($ie.text_field(:id,"txtPassword").exists?)
assert($ie.button(:index,"1").exists?)
puts 'Login:: signin - Assertion passed'
  rescue StandardError => ex
print "\n\nLogin:: signin => " + ex + "\n\n"
raise
$ie.close
  end
   # execute

   $ie.text_field(:id,"txtLogin").set(user)
   $ie.text_field(:id,"txtPassword").set(password)
   $ie.button(:index,"1").click
   puts 'Login:: signin - login successful on Sign In Page'
   sleep 10
  
end


def signout
 # assert
  assert($ie.link(:title,"Sign out of MOO").exists?) 
  puts 'Login:: signout - Assertion passed'
 # execute
  $ie.link(:title,"Sign out of MOO").click
  puts 'Login:: signout - Logout link clicked'
end

endrequire 'watir'   # the controller
require 'test/unit' 

require 'Login'

include Login

Watir.options_file = 'C:/natasha/RubyScripts/FinalAutomatedTests/options.yml'

$ie = Watir::Browser.new

class SB < Test::Unit::TestCase

def test_a_orderPlacement
  
  test_site = "www.moo.com"
  user = $ARGV[0]
  pwd = $ARGV[1]
  
 $ie.goto(test_site)
 $ie.link(:text,"Manage your orders").click
 
 assert($ie.text_field(:id,"txtLogin").exists?)
 
 Login.signin(user,pwd)
 
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Help required : Ruby code error

2008-11-27 Thread Natasha Ranney
Hi Aidy/Charley/John,

Thanks for helping me out :). It was such a stupid typo.

I am using Notepad to write my scripts and at times I use SciTE.

Now I am getting one more issue and am not understanding the reason for it. It 
was working last week. I extended it and created more modules.

I am getting an error:
NoMethodError: undefined method `assert' for Login:Module

I have attached Login module and a test program that invokes its signin method.

Thanks again,
Natasha

aidy lewis <[EMAIL PROTECTED]> wrote: 
Natasha,

Lower case you 'I' in 'If'

Also dont underscore your module names.

What editor you using?

Aidy

On 26/11/2008, Natasha  wrote:
>
>  Hi All,
>
>  Please could you help me understand the fix for a syntax error in the
>  following code:
>
>  
> 
>  require 'watir'   # the controller
>  require 'test/unit'
>
>  module UpsellPage_Sticker
>
>  def SelectQuantity(qty)
> If qty > 0 and qty <=5
> # assert
> begin
> 
> assert($ie.select_list(:id,"ddlQuantity").includes?(/#{qty}
>  pack/),"No option for #{qty} " + $ie.url)
> puts 'UpsellPage_Sticker :: SelectQuantity - 
> Assertion passed'
>
> rescue StandardError => ex
> print "\n\nUpsellPage_Sticker :: SelectQuantity => " 
> + ex + "\n\n"
> raise
> $ie.close
> end
>
> # execute
>
> $ie.select_list(:id,"ddlQuantity").select_value(/#{qty} pack/)
> puts "UpsellPage_Sticker:: SelectQuantity - #{qty} qty 
> selected on
>  Upsell Page \n"
> end
>
>  end
>  end  # end of module
>
>  
> 
>
>  If I remove IF construct from the method, it works fine. Other wise it
>  gives an error " syntax error, unexpected kEND, expecting $end
>  (SyntaxError)". Am I missing something here?
>
>  Please help me.
>
>  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
-~--~~~~--~~--~--~---

require 'watir'   # the controller
require 'test/unit' 

module Login

def signin(user,password)


  begin
# assert
assert($ie.text_field(:id,"txtLogin").exists?)
assert($ie.text_field(:id,"txtPassword").exists?)
assert($ie.button(:index,"1").exists?)
puts 'Login:: signin - Assertion passed'
  rescue StandardError => ex
print "\n\nLogin:: signin => " + ex + "\n\n"
raise
$ie.close
  end
			# execute

			$ie.text_field(:id,"txtLogin").set(user)
			$ie.text_field(:id,"txtPassword").set(password)
			$ie.button(:index,"1").click
			puts 'Login:: signin - login successful on Sign In Page'
			sleep 10
		
end


def signout
	# assert
		assert($ie.link(:title,"Sign out of MOO").exists?)	
		puts 'Login:: signout - Assertion passed'
	# execute
		$ie.link(:title,"Sign out of MOO").click
		puts 'Login:: signout - Logout link clicked'
end

endrequire 'watir'   # the controller
require 'test/unit' 

require 'Login'

include Login

Watir.options_file = 'C:/natasha/RubyScripts/FinalAutomatedTests/options.yml'

$ie = Watir::Browser.new

class SB < Test::Unit::TestCase

def test_a_orderPlacement
  
  test_site = "www.moo.com"
  user = $ARGV[0]
  pwd = $ARGV[1]
  
 $ie.goto(test_site)
 $ie.link(:text,"Manage your orders").click
 
 assert($ie.text_field(:id,"txtLogin").exists?)
 
 Login.signin(user,pwd)
 
 end
 
 end

[wtr-general] Re: Executing watir 1.6.2 scripts on MAC

2008-11-24 Thread Natasha Ranney
Thanks Bret. Yes adding the following made it work :)

Also I found that my macbook makes a lot of noise while executing the test 
script. Not sure if this is consuming a lot of cpu process.

Thanks,
Natasha

Bret Pettichord <[EMAIL PROTECTED]> wrote: 
You might need to add "require 'rubygems'" to the top of your script.

Bret

Natasha wrote:
> Hi All,
>
> I having trouble executing my scripts on MAC. They work well on
> Windows OS.
>
> I have installed firewatir and safariwatir on MAC.
>
> 1. Its giving me an error for the following statement:
> require 'firewatir'
>
> Error:
> 'require': no such file to load -- firewatir(LoadError)
>
> 2. Also can I execute the script on safari? If yes, what should the
> browser.default setting?
>
> 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
-~--~~~~--~~--~--~---



[wtr-general] Re: Executing watir 1.6.2 scripts on MAC

2008-11-20 Thread Natasha Ranney



Hi Scott,

I have tried out your suggestion, but am getting the
same issue. Somehow its not able to locate/Load the
firewatir gem or maybe its not installed correctly.
Though I don't remember seeing any error while
installing it.

Following is the snippet of my code:

require 'firewatir'
require 'test/unit'

Watir.options_file = 'options.yml'

$ie = Watir::Browser.new

Watir::Browser.default = 'firefox'

class OrderTest < Test::Unit::TestCase

end


Have also set browser type in my options.yml file:

browser: firefox



Currently following gems are installed on my machine:

firewatir(1.6.2)
commonwatir (1.6.2)
safariwatir (0.3.3)

Thanks,
Natasha


--- sbourdea <[EMAIL PROTECTED]> wrote:

> 
> Natasha,
> 
> I had this problem on Mac and if you add:
> 
> Watir::Browser.default = 'firefox'
> 
> up on top of your script it should work. For good
> measure, I have
> browser set to 'firefox' in my watir options file,
> as well.
> 
> Scott
> 
> On Nov 19, 1:20 pm, Natasha <[EMAIL PROTECTED]>
> wrote:
> > Hi All,
> >
> > I having trouble executing my scripts on MAC. They
> work well on
> > Windows OS.
> >
> > I have installed firewatir and safariwatir on MAC.
> >
> > 1. Its giving me an error for the following
> statement:
> > require 'firewatir'
> >
> > Error:
> > 'require': no such file to load --
> firewatir(LoadError)
> >
> > 2. Also can I execute the script on safari? If
> yes, what should the
> > browser.default setting?
> >
> > 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
-~--~~~~--~~--~--~---



[wtr-general] Re: Handling assert failures effectively

2008-11-20 Thread Natasha Ranney
Hi Tifanny,

Thanks for sharing this link.

One way to to get rid of the dirty console output is to completely redirect it 
to a log file.

But I just simply want to get rid of the following that gets printed on 
console, not the whole of the output:
I would like to redirect the following to a seperate log file, for debug 
purpose.


1) Failure: 
 test_a_orderPlacement(BeboStickerbook) 
 [./Product.rb:14:in `AccessProductFromHomePage' 
  C:/natasha/RubyScripts/FinalAutomatedTests/Stickerbook_bebo.rb: 
 42:in `test_ 
 a_orderPlacement']: 
 liProdStickerbookss does not exist on http://www.moo.com/. 
  is not true. 
   2) Error: 
 test_an_edit(BeboStickerbook): 
 TypeError: can't convert Range into Integer 
 C:/natasha/RubyScripts/FinalAutomatedTests/Stickerbook_bebo.rb: 
 108:in `[]' 
 C:/natasha/RubyScripts/FinalAutomatedTests/Stickerbook_bebo.rb: 
 108:in `test_ 
 an_edit' 
 
  3) Error: 
 test_an_reorder(BeboStickerbook): 
 TypeError: can't convert Range into Integer 
 C:/natasha/RubyScripts/FinalAutomatedTests/Stickerbook_bebo.rb: 
 168:in `[]' 
 C:/natasha/RubyScripts/FinalAutomatedTests/Stickerbook_bebo.rb: 
 168:in `test_ 
 an_reorder' 
---

Thanks,
Natasha

Tiffany Fodor <[EMAIL PROTECTED]> wrote: 
Hi Natasha!

Here's a discussion this topic that may help.

http://groups.google.com/group/watir-general/browse_thread/thread/a76fa88eaa260855/1af316cfbfc63fd3?lnk=gst&q=test%2Funit+assertions#1af316cfbfc63fd3

-Tiffany

On Nov 20, 11:02 am, Natasha  wrote:
> Hello All,
>
> I have tried using assertion in my code. Basically, I want to know if
> we could handle assertion failure effectively. Currently it gives an
> error and exits. Can I get redirect the failure and error
> notifications, towards the end of my output, to a log file, so that my
> console looks neat and clean.
>
> Also this is the first time I am using assertion alongwith exception
> handling. So is there a better way to write it.
>
> Following is the output that I got:
> -
>
> C:\natasha\RubyScripts\FinalAutomatedTests>Stickerbook_bebo.rb 
> --www.moo.comtest test
>
> Loaded suite C:/natasha/RubyScripts/FinalAutomatedTests/
> Stickerbook_bebo
> Started
>  Using website :www.moo.comand user : test and password : test
> --
> Test 1 : To test order placement for Bebo Stickerbooks
> Going to the MOO site:www.moo.com
>
> Product::AccessProductFromHomePage => liProdStickerbookss does not
> exist onhttp://www.moo.com/.
>  is not true.
>
> Finished in 1.703 seconds.
>
>   1) Failure:
> test_a_orderPlacement(BeboStickerbook)
> [./Product.rb:14:in `AccessProductFromHomePage'
>  C:/natasha/RubyScripts/FinalAutomatedTests/Stickerbook_bebo.rb:
> 42:in `test_
> a_orderPlacement']:
> liProdStickerbookss does not exist onhttp://www.moo.com/.
>  is not true.
>
>   2) Error:
> test_an_edit(BeboStickerbook):
> TypeError: can't convert Range into Integer
> C:/natasha/RubyScripts/FinalAutomatedTests/Stickerbook_bebo.rb:
> 108:in `[]'
> C:/natasha/RubyScripts/FinalAutomatedTests/Stickerbook_bebo.rb:
> 108:in `test_
> an_edit'
>
>   3) Error:
> test_an_reorder(BeboStickerbook):
> TypeError: can't convert Range into Integer
> C:/natasha/RubyScripts/FinalAutomatedTests/Stickerbook_bebo.rb:
> 168:in `[]'
> C:/natasha/RubyScripts/FinalAutomatedTests/Stickerbook_bebo.rb:
> 168:in `test_
> an_reorder'
>
> 3 tests, 1 assertions, 1 failures, 2 errors
>
> C:\natasha\RubyScripts\FinalAutomatedTests>
>
> -
>
> Following is a piece of code that I have written, using assertion:
> -
> require 'watir'   # the controller
> require 'test/unit'
>
> module Product
>
> def AccessProductFromHomePage(product)
>
> product_link_id =
> {"minicard"=>"liProdMinicards","businesscard"=>"liProdBusinesscards","holidaycard"=>"liProdGreetingcards","postcard"=>"liProdPostcards","stickerbook"=>"liProdSticker
> bookss","accessories"=>"liProdAccesories","all"=>"liProdSeeAll"}
>
> linkid = product_link_id[product]
>
> # assert
> begin
> assert($ie.li(:id,linkid).link(:index,2).exists?,"#{linkid} 
> does not
> exist on " + $ie.url)
> puts 'Product:: AccessProductFromHomePage - Assertion passed'
>
> rescue StandardError => ex
> print "\n\nProduct::AccessProductFromHomePage => " + ex + 
> "\n\n"
> raise
>
> ensure
> $ie.close
> end
>
> # execute
>
> $ie.li(:id,linkid).link(:index,2).click
> puts "Produ

[wtr-general] Re: Efficient code writing

2008-11-20 Thread Natasha Ranney
Hi Aidy,

Thanks for your inputs.

I am not very clear what can we use Rspec for? How is it better that Test::Unit?

I am thinking of trying to integrate watir with TestLink, as it has dual 
advantage. It allows me to maintain test cases and gives me an interface to 
execute my tests. Besides that It has reporting mechanism, which will help me 
to generate execution reports.

Regards,
Natasha
aidy lewis <[EMAIL PROTECTED]> wrote: 
Natasha,

I would try to stay away from using globals and use an instance
variable instead or pass your browser object across classes.

You could use traditional Rspec instead of Test::Unit - this will also
give you a HTML report.

There are examples on the Watir framework's page and on rsepc.info.

Aidy

2008/11/19 Natasha :
>
> Hi All,
>
> Can someone help me in writing better efficient code for the
> following:
>
> Following is a snippet of my of my tests:
> ---
> require 'watir'   # the controller
> require 'test/unit'
>
> Watir.options_file = 'C:/natasha/RubyScripts/FinalAutomatedTests/
> options.yml'
> $ie = Watir::Browser.new
>
> class Ordertest < Test::Unit::TestCase
>
>  def test_a_orderPlacement
>
>if (ARGV.length != 4)
>puts 'Usage: 
  
> 
 '
>$ie.close
>exit
>end
>
>test_site = $ARGV[0]
>user = $ARGV[1]
>pwd = $ARGV[2]
>pcode = $ARGV[3]
>
>$ie.goto(test_site)
>
># Accessing Gift Certificate link
>$ie.link(:text,"Products").click
>$ie.link(:text,"Find out more about gift certificates.").click
>
># Select postcard as gift certificate
>$ie.text_field(:id,"pc_cert_qty").set("1")
>$ie.button(:index,"1").click
>
># providing access code
>$ie.text_field(:id,"txtPromoCode").set(pcode)
>$ie.button(:id,"btnRedeem").click
>
>#Logging in
>$ie.radio(:id,"radAccountMode_return").click
>$ie.text_field(:id,"txtSignInEmail").set(user)
>$ie.text_field(:id,"txtSignInPassword").set(pwd)
>$ie.button(:id,"btnLogin").click
>
># Placing the order
>$ie.button(:id,"btnPaymentDone").click
>
># Signing out
>$ie.link(:title,"Sign out of MOO").click
>$ie.close
>
>  end # end of test_orderplacement
>
> end
> ---
>
> What could be the best way to rewrite it?
>
> Thanks a ton,
> 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: Rails test runner

2008-11-18 Thread Natasha Ranney
Hi Bill,

Thanks for the information.

I am basically looking at a simple GUI interface that can be used to invoke 
ruby test scripts .. It allow me to either execute all test scripts, selected 
test scripts. For selected test scripts, I would like to select them on some 
criteria could be name of the testscript file, using pattern matching.

Also can execute them remotely.

When I came across your application, I found that it can be quick starter for 
me. In case you find a solution or an alternative solution, please let me know.

Thanks,
Natasha

Bill Agee <[EMAIL PROTECTED]> wrote: Hi,
  
 It's not just you - the runner app doesn't work with recent versions of rails. 
 I haven't had time to investigate the problem, though - hopefully it's a small 
fix.
  
 It's been two years since that app was written, and I ended up not needing it 
in the end (I started working for a company that used a much more robust test 
execution framework).  Thus the neglect. :)
  
 Also, since then I've become a fan of running all test scripts against a new 
build, without picking and choosing individual suites in a GUI the way the 
rails app was designed to do.  However, I suppose there's still some place for 
that rails example...
   
 Thanks
Bill
 
 
 On Tue, Nov 18, 2008 at 5:45 AM, Natasha <[EMAIL PROTECTED]> wrote:
 
Hi All,

Has anyone tried the test runner code provided by Bill Agee?

Link: http://wiki.seleniumhq.org/display/WTR/Rails+test+runner+example+app
 
I just tried it and its not working. I am new to Rails and hence not
sure if I did anything wrong or if there is an issue with this
application.

Installed: Ruby 1.8.6, Watir 1.6.2 and Rails 2.1.2.
 
After doing so executed the runner_start.bat file. It just gave me
following output:
--
C:\natasha\RubyScripts\runner\runner>runner_start.bat
 
C:\natasha\RubyScripts\runner\runner>start ruby script/server --
binding=0.0.0.0

C:\natasha\RubyScripts\runner\runner>
--
 
Not sure if it actually started the application. I verified using
netstat command and didn't find port 3000 being active. I also
accessed the URL http://localhost:3000 and hence it didn't result in
 anything.

Please suggest.

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



[wtr-general] Re: Unable to type multi-line texts in textbox : Firefox

2008-11-14 Thread Natasha Ranney
I have two different pieces of code, for different pages:

 



It worked for the first one and not for the second. This is on Firefox 
2.0.0.18, with JSSH 0.9.

Following is what I executed:
$ie.text_field(:id,"txtLine1").set("Test 1\nTest 2")

Thanks,
Natasha

Nathan Lane <[EMAIL PROTECTED]> wrote: Yeah the IE variant, allows \n and this 
works perfectly. So that is probably a defect.

Nathan

On Fri, Nov 14, 2008 at 10:43 AM, Paul Rogers <[EMAIL PROTECTED]> wrote:
 its a while since I looked at the irefox code but I think that when we send a 
command to firefox we get rid of \n\r or something like that because of the 
communications.
 Maybe what we need to do is get rid of \n\r at the end of the command
 
Paul

On Fri, Nov 14, 2008 at 10:40 AM, Nathan Lane <[EMAIL PROTECTED]> wrote:
 
 Try using "Test  test 2" maybe? I'm not exactly sure, but I can run a 
test in a minute here to try and see what I can figure out.

Nathan

 On Fri, Nov 14, 2008 at 9:33 AM, Natasha <[EMAIL PROTECTED]> wrote:
 
 Hi All,
 
 I am unable to type multiline text in Textbox.
 
 Browser: Firefox 2.0.0.18
 JSSH: 0.9
 Watir: 1.6.2
 
 Following is the command executed:
 
 $ie.text_field(:id,"txtLine1").set("Test \n test 2 ")
 
 It simply types 'Test \n' .. It doesn't print 'test 2'.
 
 Is this a known problem?
 
 Thanks,
 Natasha
 
 



-- 


Nathan Lane
Home, http://www.nathandelane.com
 Blog, http://nathandelane.blogspot.com 

  
 
 





 
 
 





-- 
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: Very slow typing speed for firefox 2 : watir 1.6.2

2008-11-14 Thread Natasha Ranney
Hi Aidy,

Did you find any solution to this problem? In case, you find a solution, please 
share it with me.

For now I am just typing fewer characters, when its being executed against 
Firefox.

Thanks,
Natasha

aidy lewis <[EMAIL PROTECTED]> wrote: 
On 12/11/2008, Natasha Ranney  wrote:
> Hi Charley,
>
> I found the same behavior. It was typing at 1 character per second.
>
> Firefox version: 2.0.0.17
> OS: Windows XP
> JSSH: 0.9
>
> It would be great if you can sort this out.
>
> Thanks,
> Natasha
>

How are you running your tests?

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: Very slow typing speed for firefox 2 : watir 1.6.2

2008-11-12 Thread Natasha Ranney
Hi Aidy,

I am running my tests from windows command prompt.

> test.rb -- www.test.com param1 param2

I am using options.yml file, with following settings:

# 'ie' (Watir::IE) or 'firefox' (FireWatir::Firefox)
browser: firefox

# These options only affect IE. 
# speed options are fast, slow, and zippy
speed: fast 
visible: true
-

In my test script, I am initializing Browser object, as shown below:

require 'watir'   # the controller
require 'test/unit' 
Watir.options_file = 'C:/natasha/RubyScripts/FinalAutomatedTests/options.yml'
$ie = Watir::Browser.new
---

Please let me know, if you need more information.

Thanks,
Natasha

aidy lewis <[EMAIL PROTECTED]> wrote: 
On 12/11/2008, Natasha Ranney  wrote:
> Hi Charley,
>
> I found the same behavior. It was typing at 1 character per second.
>
> Firefox version: 2.0.0.17
> OS: Windows XP
> JSSH: 0.9
>
> It would be great if you can sort this out.
>
> Thanks,
> Natasha
>

How are you running your tests?

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: Very slow typing speed for firefox 2 : watir 1.6.2

2008-11-12 Thread Natasha Ranney
Hi Charley,

I found the same behavior. It was typing at 1 character per second. 

Firefox version: 2.0.0.17
OS: Windows XP
JSSH: 0.9

It would be great if you can sort this out.

Thanks,
Natasha

Charley Baker <[EMAIL PROTECTED]> wrote: I'm seeing this happen with one of the 
people I'm working with, slow meaning almost 1sec/character in this case. He's 
running firefox on linux. My guess is that it's due to jssh, but it's hard to 
tell, I'll poke around and see if I can find out more.  

What OS/FireFox version and jssh addon are you using? 


Thanks, 


Charley

On Wed, Nov 12, 2008 at 8:43 AM, Bret Pettichord <[EMAIL PROTECTED]> wrote:
 
 Natasha wrote:
 > I was able to install and run my test against IE using latest Watir.
 > But I found that the typing speed is very slow for firefox.
 >
 > For e.g. following command executed very slowly:
 >
 > $ie.text_field(:id,"txtLine2").set("this is text field 2")
 >
 > Is this a known issue? Is there anyway we can speep this up somehow?
 >
 
Many of us have seen this problem, but it seems to show up
 intermittently and we don't really know the cause.
 
 Bret
 

 
 





  
 

   
--~--~-~--~~~---~--~~
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: Firefox 2 : WATIR 1.6.2 and table operations

2008-11-12 Thread Natasha Ranney
Thanks Bret. Is there any workaround that you can suggest?

Bret Pettichord <[EMAIL PROTECTED]> wrote: 
We were not able to get table body support for firefox into this 
release. I have updated the compatibility matrix.

Bret

Natasha wrote:
> Hi All,
>
> I am using Watir 1.6.2 and was running my test on Firefox 2 for the
> first time.
>
> I found that the following code is not getting executed on Firefox:
> I have been able to execute it successfully on IE. Is it not
> supported?
> ==
> $ie.table(:index,1).body(:index, 1).each do | row |
>
>row.each do | cell |
>if found == 1
>  if cell.text() =~ /edit/
> puts 'Editting starts '
> puts ' '
> found=2
> cell.link(:index,1).click
> break
>   end
>end
>if cell.text() =~ /#{ono}/
>   # puts 'Found Row for order number : ' + cell.text()
>  found = 1
>break
>end
>
> end
> if found == 2
>  break
>   end
>
>   end
> ==
>
> 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
-~--~~~~--~~--~--~---



[wtr-general] Re: Tool to check a website for 404 errors [SEC=UNCLASSIFIED]

2008-10-10 Thread Natasha Ranney
Thanks Don. The solution you provided looks pretty good :)

I did quickly try it out. It looks really good, but need to explore it a bit.

Regards,
Natasha


Don Taylor <[EMAIL PROTECTED]> wrote: 
Security:[SEC=UNCLASSIFIED]

Hi all


I've just used HttpWatch (free version ) http://httpwatch.com/  and the 
accompanying site-spider (http://httpwatch.com/rubywatir/) with good effect. 

Cheers

Don

>>> Alister Scott  10/10/2008 7:47 am >>>

Hi Natasha,
Now I understand.
You may be able to use some of the logic in the script to iterate
objects on a page:
http://wiki.openqa.org/display/WTR/Save+All+Images+on+a+Webpage 

Cheers
Alister

On Oct 9, 9:46 pm, Natasha Ranney  wrote:
> Hi Alister,
>
> Thanks for sharing the script :).
>
> But this script seems to check only the main URL. I was looking for some 
> script, which will scan through all the links for a particular website and 
> list all those links that result in 404 errors.
>
> So basically it will scan through each page and its corresponding links.  I 
> do plan to write one, will share it on the wiki, once its ready.
>
> Thanks,
> Natasha
>
> Alister Scott  wrote:
>
> Hi Natasha,
>
> This script I wrote should check for 404 errors and send an email when
> they are 
> found.http://watirmelon.wordpress.com/2008/05/15/simple-web-application-mon...
>
> I use the watir method named check_for_http_error()
>
> Hope this helps your cause.
>
> If you do decide to develop something and can share it on the wiki,
> that would be really great.
>
> Cheers,
> Alister Scott
>
> On Oct 9, 12:06 am, Natasha  wrote:
>
> > Hello all,
>
> > Just a general question.
>
> > I was wondering if there is an opensource tool or any provision in
> > Watir, that will help me check any website for 404 errors.
>
> > I am planning to create one using Watir, but thought of checking if
> > there is already something available.
>
> > Thanks and regards,
> > Natasha


As a ComSuper employee, you are responsible for ensuring any email content you 
store or pass on, conforms to the ComSuper email policy and guidelines(as found 
on the ComSuper Intranet). You are also responsible for ensuring that any 
solicited email conforms to this policy, particularly those concerning official 
conduct. Further processing maybe undertaken to ensure email complies with 
ComSuper policy and guidelines. Please note that if you misuse the ComSuper IT 
computing facilities a formal investigation under the ComSuper procedures for 
Managing Breaches of APS Code of Conduct maybe instituted. In the event a 
breach is found, a range of possible sanctions apply, including possible 
termination of employment.





   
--~--~-~--~~~---~--~~
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: Tool to check a website for 404 errors

2008-10-10 Thread Natasha Ranney
Thanks Alister. That would be great.

Alister Scott <[EMAIL PROTECTED]> wrote: 
I might do an SVN checkout Matthew's code and include it in a wiki
example page.
I don't think we should expect first time Watir users looking for
example usage to install and checkout a SVN repo.
I'll ask him first, I noticed his Watir blog hasn't been updated since
Feb, does he still read this group I wonder?

Cheers,
Alister

On Oct 10, 7:10 am, Bret Pettichord  wrote:
> You might take a look at Jim Matthew's Link Checker.
>
> http://www.io.com/~wazmo/blog/archives/2008_05.html#000277
>
> Natasha wrote:
> > Hello all,
>
> > Just a general question.
>
> > I was wondering if there is an opensource tool or any provision in
> > Watir, that will help me check any website for 404 errors.
>
> > I am planning to create one using Watir, but thought of checking if
> > there is already something available.
>
> > 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: Tool to check a website for 404 errors

2008-10-09 Thread Natasha Ranney
Hi Alister,

Thanks for sharing the script :).

But this script seems to check only the main URL. I was looking for some 
script, which will scan through all the links for a particular website and list 
all those links that result in 404 errors.

So basically it will scan through each page and its corresponding links.  I do 
plan to write one, will share it on the wiki, once its ready.

Thanks,
Natasha

Alister Scott <[EMAIL PROTECTED]> wrote: 
Hi Natasha,

This script I wrote should check for 404 errors and send an email when
they are found.
http://watirmelon.wordpress.com/2008/05/15/simple-web-application-monitoring-with-watir/

I use the watir method named check_for_http_error()

Hope this helps your cause.

If you do decide to develop something and can share it on the wiki,
that would be really great.

Cheers,
Alister Scott


On Oct 9, 12:06 am, Natasha  wrote:
> Hello all,
>
> Just a general question.
>
> I was wondering if there is an opensource tool or any provision in
> Watir, that will help me check any website for 404 errors.
>
> I am planning to create one using Watir, but thought of checking if
> there is already something available.
>
> 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: Clicking a menu item

2008-10-08 Thread Natasha Ranney
Not sure. But, did you try the following:

$ie.span(:id,"Id_Of_Span").link(:index,1).click

Fatema Karim <[EMAIL PROTECTED]> wrote: 
Hi Tiffany, 

I have tried the Span with it's id but that did not work. 
On Tue, Oct 7, 2008 at 4:56 PM, Tiffany Fodor <[EMAIL PROTECTED]> wrote:
 
 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] Re: How to locate an INPUT element embedeed in a table

2008-10-08 Thread Natasha Ranney
Thanks Ravi & Cynthia. It worked :)

Regards,
Natasha

Cynthia Zhang <[EMAIL PROTECTED]> wrote: 
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  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  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  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  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 s

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