Re: [wtr-general] Update chromedriver

2012-08-06 Thread Felipe Knorr Kuhn
If you are using a Mac, you are probably better off using Homebrew to
install and update chromedriver

http://mxcl.github.com/homebrew/

brew update
brew upgrade chromedriver

On Mon, Aug 6, 2012 at 1:59 PM, Joe Fleck  wrote:

> Hi Željko,
>
> I was following the MAC installation instructions.
>
> I think thats the problem I can't seem to find were I originally pasted it.
>
> I reran the command from the installation instructions and here is the
> outcome:
>
> Josephs-MacBook-Pro:~ josephfleck$ echo $PATH
>
> /Users/josephfleck/.rvm/gems/ree-1.8.7-2010.02/bin:/Users/josephfleck/.rvm/gems/ree-1.8.7-2010.02@global
> /bin:/Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/bin:/Users/josephfleck/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin
>
> now I don't see the .rvm folder.
>
> Is there a setting I need to change on my MAC to see it?
>
> Joe
>
> On Mon, Aug 6, 2012 at 12:31 PM, Željko Filipin  wrote:
> > On Mon, Aug 6, 2012 at 6:05 PM, Joe Fl  wrote:
> >> I am trying to update my chromedriver from 16.0.902 to 21 but not sure
> how
> >> to.
> >
> > Just copy the new file over the old one. Where did you put chromedriver
> file
> > previously?
> >
> >> I followed the install instructions and when I execute the following:
> >
> > What instructions are you following?
> >
> > Željko
> > --
> > filipin.eu
> >
> >
> > --
> > Before posting, please read http://watir.com/support. In short: search
> > before you ask, be nice.
> >
> > watir-general@googlegroups.com
> > http://groups.google.com/group/watir-general
> > watir-general+unsubscr...@googlegroups.com
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Excel interface class - does excel actually need to be installed

2010-11-23 Thread Felipe Knorr Kuhn
You might consider using YAML instead of XML :)

FK

On Tue, Nov 23, 2010 at 2:20 PM, Dan  wrote:

> Thanks!  I found roo to be kind of a pain to work with, so I ended up
> just storing the data in xml files.
>
> Dan
>
> On Nov 18, 4:04 am, Željko Filipin 
> wrote:
> > On Wed, Nov 17, 2010 at 11:10 PM, Dan  wrote:
> > > Hello!  This may be a silly question, but does excel actually need to
> > > be installed on the machine to be able to read from an excel file with
> > > the Excel interface class?  Chances are the machines that will be
> > > running my scripts won't have Excel installed.
> >
> > Take a look at roo if you need to work with Excel and do not have it
> > installed.
> >
> > http://roo.rubyforge.org/
> >
> > Željko
> > --
> > watir.com - community manager
> > watirpodcast.com - host
> > testingpodcast.com - audio podcasts on software testing. all of them
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Watir doesn't wait for redirect to complete on IE6

2010-11-20 Thread Felipe Knorr Kuhn
what kind of redirect is this?

?

On Tue, Nov 16, 2010 at 10:06 AM, dimovich  wrote:

> It's basically:
>
> ie.goto 'page that redirects'
> ie.link(:id, 'MyLink').click
>
> On IE8 the 'click' call will fail because Watir cannot find the link
> (redirect hasn't finished yet so this is expected). On IE8 everything
> works just fine.
>
>
>
> On Nov 16, 1:12 pm, Željko Filipin 
> wrote:
> > On Tue, Nov 16, 2010 at 12:05 PM, dimovich  wrote:
> > > On IE6 when requesting a page that redirects Watir will return
> > > imediately. On IE8 Watir will wait for redirect to complete. Did
> > > anybody else bump into this?
> >
> > Please show us the code.
> >
> > So, it works manually, but not from a Watir script?
> >
> > Željko
> > --
> > watir.com - community manager
> > watirpodcast.com - host
> > testingpodcast.com - audio podcasts on software testing. all of them
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [Wtr-development] [wtr-general] Watir 1.6.6 final released

2010-10-04 Thread Felipe Knorr Kuhn
Hello, Jarmo and all,

I've been away from Watir for a while because the project I'm currently
working is written in Java, so nevermind if I'm asking the obvious :)

What's the current status (or future roadmap) of the WebDriver integration?
One of the things I'm enjoying a lot about Selenium 2 is WD and how easy it
is to create new Firefox profiles and install extensions programatically,
not to mention the default setting to ignore all SSL certificate errors :)

Is it still a pain to take screenshots with Watir? Selenium 1 has a
captureEntirePageScreenshot() method and Selenium 2 has an interface to take
screenshots. I noticed someone (Jarmo?) posted library to take screenshots
under Windows recently, but there isn't anything like that for Linux or Mac,
right?

By the way, what development environment are you guys using lately?

FK

On Mon, Oct 4, 2010 at 11:47 AM, Jarmo  wrote:

> Ok, congratulations to everyone!
>
> So, maybe it's time to think about agenda of 1.6.7?
>
> I have these things in my mind:
> 1) remove ActiveSupport dependency in FireWatir
> 2) add convenience methods for waiting by Jari
> (
> http://github.com/jarib/watir-webdriver/blob/master/lib/watir-webdriver/extensions/wait.rb
> )
> 3) add support for newer rubies... this could be bigger goal and done
> in step-by-step because it won't be too easy to do i'm afraid
> 4) fix/close bugs in jira :)
> 5) cleanup repos
>
> That's all i can think of right now. Any other ideas/propositions?
>
> Jarmo
>
> On Mon, Oct 4, 2010 at 5:16 PM, Željko Filipin
>  wrote:
> > On Sun, Oct 3, 2010 at 8:35 PM, Charley Baker 
> > wrote:
> >> We are happy to announce that a (very) long-waited (Fire)Watir
> >> 1.6.6 final gem is out!
> >
> > Feel free to spread the word:
> >
> > http://watir.com/2010/10/04/watir-1-6-6-final-released/
> > http://twitter.com/#!/watir/status/26364215500
> >
> > Željko
> > --
> > watir.com - community manager
> > watirpodcast.com - host
> > testingpodcast.com - audio podcasts on software testing. all of them
> >
> >
> > ___
> > Wtr-development mailing list
> > wtr-developm...@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-development
> >
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Random value from a select list

2010-09-30 Thread Felipe Knorr Kuhn
Another option:

array[rand(array.size)]

On Thu, Sep 30, 2010 at 10:25 AM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Thu, Sep 30, 2010 at 3:15 PM, ISmellGas 
> wrote:
> > Is it possible to get the contents of the select list into an array,
> > count how many items are in that array and select a random one?
>
> Sure, select_list.options will return array of contents, then just pick a
> random one:
>
> Select lists: http://wiki.openqa.org/display/WTR/Selection+Boxes
>
> Watir API: http://wtr.rubyforge.org/rdoc/1.6.5/
>
> For random numbers:
>
> http://www.google.com/search?q=ruby+random
>
> http://www.codeodor.com/indein:trashx.cfm/2007/3/25/Ruby-random-numbers/1042
>
> Let us know if you get stuck.
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
>
>
>  --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] RE:Automating command line tools

2010-09-03 Thread Felipe Knorr Kuhn
Although this has nothing to do with Watir, you could use something like
expect.

http://debaan.blogspot.com/2007/09/simple-expect-ssh-example.html

Good luck

On Fri, Sep 3, 2010 at 10:04 AM, Srinidhi  wrote:

> Hi All,
>  Is it possible to automate command line tools like puttysftp or
> openSSH in ruby. Please let me know any way.
>
>
> :>>Sorry if i have posted it in wrong section. i have been asking this
> question everywhere now.
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


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

2010-08-27 Thread Felipe Knorr Kuhn
did you try updating rubygems and the installed gems?

gem update --system
gem update

On Fri, Aug 27, 2010 at 2:56 PM, Super Kevy
wrote:

> Followed the links:
> http://github.com/jarib/watir-webdriver
> http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/
>
> Test the install notes on
> http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/
>
> Win2k Install:
> 1. Did gem install watir-webdriver.
> Returns:
> ERROR: Error installing watir-webdriver:
>  ffi requires rake <>=0.0.7, runtime>
>
> 2. Fix attempt
> gem install rake
> gem install watir-webdriver
> Returns:
> ERROR: Error installing watir-webdriver:
>  ffi requires rake <>=0.0.7, runtime>
>
> About:
> Ruby Verison: 1.8.6
> Watir Version: 1.6.5
> OS: W2K
> Browsers: IE6, FF 3.5.7
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] scheduling tasks for watir suite

2010-08-26 Thread Felipe Knorr Kuhn
That's a good option as well :)

Since you touched that topic, I would also recommend Hudson [1] and the Ruby
Plugin [2] which allows you to run ruby code as task.

[1] http://www.hudson-ci.org/
[2] http://wiki.hudson-ci.org/display/HUDSON/Ruby+Plugin

FK

On Thu, Aug 26, 2010 at 4:58 PM, Charley Baker wrote:

> You might want to look into continuous integration, google for that and
> cc.rb, run your own server, steal an unused box and run it on there :).
> That's the simple answer.
>
> -c
>
>
> On Thu, Aug 26, 2010 at 12:26 PM, nix  wrote:
>
>> Hello
>>
>> I've read many discussions on scheduling a task for watir suite but
>> Iam not able to find the exact solution. If any one can help me
>> understanding of how to create a schedule task for my watir suite.
>>
>> Thanks... Nix
>>
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> You received this message because you are subscribed to
>> http://groups.google.com/group/watir-general
>> To post: watir-general@googlegroups.com
>> To unsubscribe: 
>> watir-general+unsubscr...@googlegroups.com
>>
>
>  --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] scheduling tasks for watir suite

2010-08-26 Thread Felipe Knorr Kuhn
If you are using Windows, you could use Task Scheduler.

If you are using Linux, you could use crontab.

If you want to use just Ruby, check
http://rufus.rubyforge.org/rufus-scheduler/ out

FK

On Thu, Aug 26, 2010 at 3:26 PM, nix  wrote:

> Hello
>
> I've read many discussions on scheduling a task for watir suite but
> Iam not able to find the exact solution. If any one can help me
> understanding of how to create a schedule task for my watir suite.
>
> Thanks... Nix
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Unable to connect to oracle by oci8

2010-08-20 Thread Felipe Knorr Kuhn
You probably have to install the oracle client as well.

On Thu, Aug 19, 2010 at 11:24 AM, Wang, Conglin wrote:

>  Hi groups,
>
> When I try to connect to oracle db by oci8,it hints below error:
>
> c:/ruby186-26/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.2-i386-mswin32/lib/oci8
> .rb:52:in `init': OCI Library Initialization Error (OCIError)
>
> from c:/ruby186-26/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.2-i386-
> mswin32/lib/oci8.rb:52
>
> from c:/ruby186-26/lib/ruby/site_ruby/1.8/rubygems/custom_require.
> rb:32:in `gem_original_require'
>
> from c:/ruby186-26/lib/ruby/site_ruby/1.8/rubygems/custom_require.
> rb:32:in `require'
>
> I did really install the oci8 gem.And I can run successfully on other
> people’s machine except mine.
>
> Could you help to give me some clue for solution?Thanks.
>
>   --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Watir testing a XSLT webapp

2010-08-11 Thread Felipe Knorr Kuhn
Perhaps this site can be used as an example:

http://verdi.softwarelivre.org/papers_ng/public/fast_grid

It's all XLST and has a search functionality at the bottom.

FK

2010/8/11 Luke Hamilton 

>
>
>
> On 10/08/2010, at 6:05 PM, Željko Filipin wrote:
>
> On Tue, Aug 10, 2010 at 2:17 AM, Luke Hamilton <
> luke.hamil...@xenter.com.au> wrote:
> > I am in the process of trying to write a watir script to test a XSLT
> based webapp and have found that as soon as I launch the app watir is unable
> to click any of the links on the page
>
> Can you post link to the page (if it is public) or minimal code that will
> reproduce the problem?
>
>
> No sorry this is a private project, and I currently dont have any sample
> code.
>
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
> vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>
>
>  --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Understanding Modules and Classes a little better

2010-07-27 Thread Felipe Knorr Kuhn
Hello, Jason.

The Programming Ruby 1.9 book, found at pragprog.com is great and has
a quite extensive chapter on classes and modules. I highly recommend
you to buy it (I can send you a 40% discount code if you want :)

I won't reproduce the entire chapter here, but the main difference is
that modules cannot be instantiated.

This FAQ [1] defines both as follows:

8.8 What is the difference between a class and a module?

Modules are collections of methods and constants. They cannot generate
instances. Classes may generate instances (objects), and have
per-instance state (instance variables).

Modules may be mixed in to classes and other modules. The mixed-in
module's constants and methods blend into that class's own, augmenting
the class's functionality. Classes, however, cannot be mixed in to
anything.

A class may inherit from another class, but not from a module.

A module may not inherit from anything.

--

So, applying these concepts to your framework, I would create modules
as helper "classes", providing commonly used methods like file
operations, logging, etc that are not part of the application
business.

Navigation functions should be placed in classes representing your
application pages, for example:

Class MainPage is instantiated with a @ie.attach(:title, /Home Page/)
object, should have a login(username, password) method and so on.

This might leave you with something like the Page Object Model [2],
which is a very interesting way to model your tests.

Was it helpful?

[1] http://www.rootr.net/rubyfaq-8.html
[2] http://code.google.com/p/selenium/wiki/PageObjects


On Tue, Jul 27, 2010 at 5:48 PM, Jason  wrote:
>
> Hey team,
>
> I might post a few discussions here over the coming days trying to
> better improve my framework, and to start I want to make sense of
> Modules and Classes.
>
> Previously I've just written a whole lot of methods, loaded every
> script and called each method as required, with little or no concept
> of placing these within Modules or Classes. it works fine, but surely
> I can do better.
>
> I just don't quite understand them and how to effectively use them
> well enough, so I'm wondering if anyone can point me in the direction
> of some good tutorials, or even better, some Watir-specific examples
> that use them well.
>
>
> Thanks,
>
> Jason
>
> --
> Before posting, please read http://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed to 
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] How to input data to the CKEDITOR?

2010-07-12 Thread Felipe Knorr Kuhn
Hello,

You have to use CKEditor via Javascript, after the component has fully
rendered.

I don't have a Watir script handy, but here's how I did with Selenium:

selenium.waitForCondition("var x =
selenium.browserbot.findElementOrNull('//t...@id=\"cke_contents_userForm:userstory\"]');
x != null;", "5");
selenium.runScript("CKEDITOR.instances['userForm:userstory'].setData('Data');");

My Watir skills are a bit rusty, but I think you should take this route:

Waiter.wait_until(20,5) do

  
browser.element_by_xpath("//t...@id='cke_contents_userForm:userstory']").exists?
end

browser.execute_script("CKEDITOR.instances['userForm:userstory'].setData('Data');")


Good luck,

FK

On Mon, Jul 12, 2010 at 4:26 AM, Soori  wrote:

> All,
>
> I have a form with CKEDITOR for fields. I am not able to input data to
> the CKEDITOR through my WATIR Script. I am getting the following
> error,
>
>  OLE error code:800A083E in htmlfile
>  Can't move focus to the control because it is invisible, not
> enabled, or of a type that does not accept the focus.
>HRESULT error code:0x80020009
>  Exception occurred.   from c:/ruby/lib/ruby/gems/1.8/gems/
> watir-1.6.5/lib/watir/input_elements.rb:333:in `set'
>from MyTest.rb:29
>
> Please help me on this.
>
> /Soori
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] How to sell Watir services to non-techie customers

2010-07-06 Thread Felipe Knorr Kuhn
Hello, George

You have lots of difficult questions :)

I'll answer based on what I have done in my previous company, so in
this case, my potential client was my manager (and his clients, as it
was an outsourcing company).

First, I showed him how long our tests were taking, and estimated how
much it would take to create Watir scripts and how much time the test
runs would save us, so we could spend that time on more intellectual
tasks rather than mechanical, repeated, regression tests.

As for charging your clients, I would try to charge them by automated
feature, after you have done a little research about the
testability/"automationability" of the system. You should develop your
scripts as the client needs to avoid wasting time or working on
useless features.

When my manager liked our automated test suite, I decided to write a
nice and graphical test runner with FxRuby, so he could send it to our
customers. It was all packed nicely with ruby2exe. However, I don't
think I would do it again, because as far as I remember, ruby2exe is
dead and doesn't work all times.

Just an advice, don't sell automation as a silver bullet to their
problems. Also, check out the system first, so you don't charge your
customer after reaching a dead end.

Regards,

FK

On Tue, Jul 6, 2010 at 1:39 PM, George  wrote:
> I was hoping I can get some advice from you all regarding how to
> utilize my Watir skills to help others automate tasks. I guess my
> questions are:
>
> 1. How do I sell my services to a potential customer?
> 2. How much should I charge for script development? Is it by the hour?
> By the size of the project?
> 3. Would I need to require them to install Ruby/Watir/other gems to
> run the scripts or should I try to encapsulate it into an .exe file?
> 4. Any other advice/insight?
>
> Thanks,
>
> George
>
> --
> Before posting, please read http://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed to 
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Issue with Watir Installation

2010-06-21 Thread Felipe Knorr Kuhn
Hello,

If you are using WinXP, click on Start -> Run and launch msconfig.exe

Click on Services, find the Remote Procedure Call item and try to start it.

FK

On Mon, Jun 21, 2010 at 9:31 AM, Betsy  wrote:
> Hi,
> I have written an script like:-
> 1)Open Webbrowser
> 2)Open Google.com
> 3)Now setText on the textBox then
> 4)Click on the Button.
>
>     my problem is that Text is not being set into the TextBox, and
> if i am runnig this Script on the other system, it is working
> properly.
>    I have reinstall Ruby many times but problem still persist.
> my Script is:
> 
> require "watir"
> url="www.google.co.in"
> ie=Watir::IE.new
> ie.bring_to_front
> ie.maximize
> ie.goto url
> t=ie.text_field(:name,"q")
> t.set("Delhi")
> b=ie.button(:name,"btnG")
> b.click
> sleep(2)
> ie.close
> --
>
> I also copied the whole Rubi folder from other system to my
> system .But problem still persist.
> and when i executed "gem install watir" then command prompt hangs out.
>
> Error msg:
> 
>>ruby google.rb
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
> 460:in `method_missing': unknown property or method
> `document' (WIN32OLERuntimeError)
>    HRESULT error code:0x800706ba
>      The RPC server is unavailable.    from c:/ruby/lib/ruby/gems/1.8/
> gems/watir-1.6.5/lib/watir/ie-class.rb:460:in `document'
>        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
> container.rb:800:in `locate_input_element'
>        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
> input_elements.rb:5:in `locate'
>        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
> 53:in `assert_exists'
>        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
> 288:in `enabled?'
>        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
> 60:in `assert_enabled'
>        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
> input_elements.rb:327:in `set'
>        from google.rb:8
>>Exit code: 1
> =
>
> --
> Before posting, please read http://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed to 
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] uninitialized constant Watir

2010-06-18 Thread Felipe Knorr Kuhn
I would guess you have to import the rubygems package as well.

Can you try that?

On Fri, Jun 18, 2010 at 1:48 PM, Adam  wrote:
> i have a question about a REALLY weird error I'm getting
> using notepad++ windows 7, ruby 1.8.6, latest installation of Watir
> using "gem install watir" command
> so i changed the filename of my ruby script yesterday and now whenever
> I add the line require 'watir' i get the following error message:
>
> 
> ./watir.rb:5: uninitialized constant Watir 
> from isitfixed.rb:1:in 'require'
> from isitfixed.rb:1
> 
>
> i don't see why changing the filename would break watir
>
> anybody know what might be happening?
>
> --
> Before posting, please read http://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed to 
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Watir site at stackexchange.com

2010-06-18 Thread Felipe Knorr Kuhn
Z*,

I have added 5 more questions.

FK

2010/6/18 Željko Filipin :
> On Thu, Jun 17, 2010 at 5:39 PM, Željko Filipin
>  wrote:
>> - go to
>> http://area51.stackexchange.com/proposals/6738/watir?referrer=cBxk1oncaoo1
>> - click link "Follow It!"
>> - enter your e-mail
>> - click button "Submit"
>
> I am glad to see that in just one day we have 9 people "following" Watir
> site. I did some research and the site will not be created unless 60 people
> are following it. So, 51 to go.
>
>> Optionally, you can add on-topic and off-topic questions, and vote on
>> other questions as on- or off-topic.
>
> I have added 5 questions. (One person can only add 5 questions.) Please vote
> if questions are on- or off-topic. (I can not vote for my questions.)
>
> Also, please add a question (or five). If you need inspiration:
>
> http://groups.google.com/group/watir-general/topics
> http://stackoverflow.com/tags/watir
> http://wiki.openqa.org/display/WTR/FAQ
>
> I really think that moving support to stackexchange.com will be a great
> thing for Watir community. But, I can not do it myself. The software is
> built in a way that requires community participation, not one man show.
>
> Thanks,
>
> Željko
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] How to read a google doc or send a google mail?

2010-06-17 Thread Felipe Knorr Kuhn
There's also ROO if you want to access Google Docs Spreadsheets

http://github.com/hmcgowan/roo

Might be nice to have data driven tests (somewhat) in the cloud.

FK

On Wed, Jun 16, 2010 at 10:20 PM, Wesley Chen  wrote:
> I just want to have a try on the gmail and goog doc.
> In fact, I can use ruby-mail to get emails and send email in google.
> I think google mail and google doc are really welcome, if I can access them
> in Watir, that would be great.
> Wesley.
> For life, the easier, the better.
>
>
> On Mon, Jun 14, 2010 at 4:27 PM, Željko Filipin
>  wrote:
>>
>> On Sat, Jun 12, 2010 at 7:42 AM, Wesley Chen  wrote:
>> > Problem 1: Send an gmail(Click "Compose Mail" link, input "Email to",
>> > "Subject", "Email content", click "Send" button");
>> > Problem 2: Go to Google Documents page, open an existing DOC/PPT/excel,
>> > read the data in it.
>>
>> Do you need to test Gmail's web interface or just get mail from there? The
>> same question for Docs, do you just need the data or do you need to test web
>> interface?
>>
>> Željko
>> --
>> watir.com - community manager
>> watirpodcast.com - host
>> testingpodcast.com - audio podcasts on software testing. all of them
>> vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi
>>
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> You received this message because you are subscribed to
>> http://groups.google.com/group/watir-general
>> To post: watir-general@googlegroups.com
>> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Firefox 3.6.3 JSSh on Linux

2010-06-08 Thread Felipe Knorr Kuhn
Hello all,

I'm trying to help a friend setup FireWatir under Linux and she's
using FF 3.6.3.

The wiki [1] does not have the XPI for FireFox 3.6 and I couldn't find
any links in the email archives.

Does anyone have the XPI handy? I would like to save my friend from
the hassle of compiling Firefox on her own.

Thanks,

FK

[1] 
http://wiki.openqa.org/display/WTR/FireWatir+Installation#FireWatirInstallation-2)InstalltheJSSHFirefoxExtension

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] anyone want to do a watir version?

2010-05-25 Thread Felipe Knorr Kuhn
Very nice!

Since I've been using Selenium a lot lately (don't blame me!) I might
try those challenges first :)

FK

On Tue, May 25, 2010 at 3:13 PM, Paul Rogers  wrote:
> http://seleniumexamples.com/blog/examples/play-pacman-with-selenium-2/
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Not able to click Enter using SENDKEY

2010-05-24 Thread Felipe Knorr Kuhn
>From the Watir FAQ ( http://wiki.openqa.org/display/WTR/FAQ )

How do I fix a WIN32OLERuntimeError when I use AutoIt?

In some cases, after you install Watir, the .dll file fails to get
registered which gives an error similar to the following:

Exception 'WIN32OLERuntimeError' at : - unknown
OLE server: 'AutoItX3.Control'

If this is your problem, then all you need to do is type the following
where your AutoItX3.dll file is installed (if you are using Watir's
version of AutoIt then on windows for 1.5.6 it should be at:
c:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.6\watir, for 1.6.2 it should
be at: C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir )

regsvr32 AutoItX3.dll

Following this you will see a pop-up window saying: "DllRegisterServer
in autoitx3.dll succeeded."

On Mon, May 24, 2010 at 8:41 AM, meaculpa  wrote:
> Hi All,
>
> I had a search field and I have to do a blank search.
>
> My code is :
>
> require'rubygems'
> require 'watir'
> require 'win32ole'
>
> $m_link = 'ww1.*.com'
> $browser = Watir::IE.start($m_link)
> $browser.text_field(:name, "keywords").set('')
> $browser.send_keys("{enter}")
> $browser.waitForIE
>
> but its not clicking..
>
> error got is
>
>>ruby return.rb
> C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:113:in
> `initialize': unknown OLE server:
> `AutoItX3.Control' (WIN32OLERuntimeError)
>    HRESULT error code:0x800401f3
>      Invalid class string
>        from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:
> 113:in `new'
>        from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:
> 113:in `autoit'
>        from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:
> 425:in `autoit'
>        from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:
> 433:in `send_keys'
>        from return.rb:30
>>Exit code: 1
>
>
>
> Please help..
>
> --
> Before posting, please read http://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed to 
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] how to click on the element with the id = "logoutLink"

2010-05-23 Thread Felipe Knorr Kuhn
Hello, Cristina,

have you tried

$ie.link(:text, "Logout").click
$ie.link(:text, "Logout").fire_event("onClick")

?

On Sun, May 23, 2010 at 5:29 PM, Cristina  wrote:
> Hi,
>
> please can one help me with that:: i do not know how to click on the logout.
> That is the snippet code:
>
> #-
> 
> 
> 
> 
> Welcome q...@qa.hemt.ca |
>  
> |
>  Logout 
> 
> 
> #
>
>
> I've try
> $browser.cell(:id => "logoutLink").click
>
> or
> $browser.link(:text, "Logout").click
> or
> $browser.link(:id, "LogoutLink").click
>
> but is not working.
>
>
> Best regards,
> Cristina
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] not a frame nor form for a newbie....continued....

2010-05-20 Thread Felipe Knorr Kuhn
Hello,

It seems that there are frames in that popup.

Do a ie.show_frames after attaching to that window.

If they are frames, you'll be able to access the elements via
ie.frame(:name, "MAINIFRAME")

FK

On Thu, May 20, 2010 at 3:38 PM, dave  wrote:
> ...oka i took your advice and:
>
> ...BUTno objects on the page even though there are select
> boxshow do i access them?
> are they inside the javascripts? if so how do access them? using what
> name?tia dave
> browser=Watir::IE.attach(:title,"Infor EAM")
> irb(main):099:0> browser.show_all_objects
> ---Objects in page -
> text/css          id=
> text/javascript   id=                 src=../includes/javascripts/
> dstmLanguage_E
> N.js
> text/javascript   id=                 src=../includes/javascripts/
> dstmUtility.js
>
> text/javascript   id=                 src=../includes/javascripts/
> dstmDHTMLMenu.
> js
> text/javascript   id=                 src=../includes/javascripts/
> dstmMain.js
> text/javascript   id=                 src=../includes/javascripts/
> common_xsl.js
>                  id=                 src=
>                  name=               id=
>                  name=               id=
>                  name=               id=
>                  name=               id=
>                  name=               id=
>                  name=               id=
>                  name=               id=
>                  name=               id=
>                  name=               id=
> HTML Document     name=CLONEMAINIFRAME  id=CLONEMAINIFRAME  src=../
> includes/dumm
> y.html
> HTML Document     name=MAINIFRAME     id=MAINIFRAME       src=COMMON?
> REQ_KEY=534
> 2958944152932758
> HTML Document     name=glasstop       id=glasstop         src=../
> includes/glasst
> op.html
> HTML Document     name=               id=                 src=../
> includes/dummy.
> html
> => nil
> irb(main):100:0>
>
> --
> Before posting, please read http://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed to 
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] not a frame nor form for a newbie....

2010-05-20 Thread Felipe Knorr Kuhn
Have you tried ie.attach(:title, /title/)?

On Thu, May 20, 2010 at 12:44 PM, dave  wrote:
> i'm trying to access a spawned ie window after login...that's neither
> a frame nor formi think
> i'm able to startup and login to our workorder system...with this
>
> ie = Watir::IE.start('http://cpp-woapp.cpp.org/web/base/logindisp')
>
> ...and find the proper places to put the user name and password
> ...and click the login button:
>   ie.button(:id,'submit').click
>
> ...BUT...this complex vendor supplied software (even though the web
> server and software is all inside our own LAN).
> 1.) spawns a whole new IE screen(/IE window?) while keeping the
> original login screen in a completely different IE browser /window.
> This results in having two IE on my window(XP) minimize bar.
> 2.) This second spawned window has only a title on it AND i am unable
> to view any HTML or access any toolbars...nor access through ie
> methods i know of
> ..any ideas on how to access this second screen (i've already tried
> ie.frame and ie.form)...tia dave
>
> --
> Before posting, please read http://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed to 
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] "require "watir" is not recognized on a vmware

2010-05-10 Thread Felipe Knorr Kuhn
Hello Cristina,

It could be because using rubygems is not default in your new install.

Try adding "require "rubygems"" before "require "watir"" but keep this post
in mind http://tomayko.com/writings/require-rubygems-antipattern

Good luck,

FK

On Mon, May 10, 2010 at 4:20 PM, Cristina wrote:

> Hi,
>
> Starting last week i wrote some test suites using watir/ruby. And very
> pleased up to now - working on xp.[ruby 1.8.6; ]
>
> Now, we have a virtual machine wmware[running windows xp] and I installed
> firefox 5.6; the same ruby version[1.8.6], firewatir and watir.
>
> Moved my scripts into the same location.
>
> When I try to run it looks like "require "watir"" is not recognized.
>
> I am receiving the following error:
> ..: in 'require': no such file to load -- watir (LoadError)
>
> In fact even using irb when I perform "require 'watir' " I am reciving the
> same error.
>
>
> I do not know what to do? What can be missing.
>
> I appreciate a lot your help.
>
>
> I was searching
> Best regards,
> ~~ Cristina
>
>
>
>
> ~~ Cristina
>
>
>  --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Watir calling web services

2010-05-10 Thread Felipe Knorr Kuhn
Hello,

I don't know how you're supposed to test Web Services with Watir, unless you
want to compare the values displayed in your web app with the web services
backend.

What people usually use for web services testing is SoapUI.

If you are looking for a Ruby library, I think soap4r is a good start.

FK

On Mon, May 10, 2010 at 2:57 PM, Jason Shelton wrote:

>  Hello,
>
> I am writing to ask if anyone has used Watir for web services/API level
> testing. If so, how?  If not, what tools would you recommend for this
> testing?  Thank you in advance for any help that you may provide.
>
> --
> The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get
> started.
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Watir xpath navigation problem

2010-05-06 Thread Felipe Knorr Kuhn
Felipe,

To test the :index locator, I created this simple file:













What happens if you try this:

require "rubygems"
require "watir"

@browser = FireWatir::Firefox.new

@browser.goto "file:///c:/teste.html"

i = 1
1.upto(@browser.text_fields.size) do
  @browser.text_field(:index, i).set i.to_s
  i += 1
end

You should be able to identify the correct index to use on your field with
that.

FK

On Thu, May 6, 2010 at 4:52 PM, Felipe Pedrini wrote:

> Hi George,
>
> It's not a site developed by my team. Our role is to apply the
> automation test on it. I have no way to change anything on it. To use
> the index attribute on HTML source. And access it using the :index.
>
> But I've tried this anyway, using the :index hoping it will bind the
> tabindex. But, it was just a hope, it doesn't work (same error).
>
> Thanks
>
> On 6 maio, 16:25, George  wrote:
> > Hi there,
> >
> > I'm not sure how many text fields are on the page, but have you
> > considered using the :index attribute?
> >
> > @ie.text_field(:index, 5).set "something"
> >
> > On May 6, 12:07 pm, Felipe Pedrini  wrote:
> >
> >
> >
> > > Hello, FK,
> >
> > > Yes, it was I thought, a bug, but I came ask here just to confirm.
> >
> > > I've tried the workaround, and I have no success. The error continues:
> >
> > > D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> > > element.rb:907:in `assert_exists': Unable to locate element,
> > > using :xpath, "//*...@tabindex='4901']"
> > >  (Watir::Exception::UnknownObjectException)
> >
> > > And, yes, my tabindex is unique. Do you have any other sugestion? I'm
> > > not a specialist in xpath queries.
> >
> > > Thanks!
> >
> > > On 6 maio, 15:42, Felipe Knorr Kuhn  wrote:
> >
> > > > Hello, Felipe,
> >
> > > > It sure does look like a bug.
> >
> > > > A workaround would be using the wildcard selector like this:
> >
> > > > @ie.text_field(:xpath, "//*...@tabindex='4901']").set "test"
> >
> > > > Hopefully your tabindex property is unique to all elements :)
> >
> > > > Regards,
> >
> > > > FK
> >
> > > > On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini <
> felipedr...@gmail.com>wrote:
> >
> > > > > Hi guys,
> >
> > > > > I'm evaluating Watir, and I'm trying to simple get an element using
> > > > > its XPath. But I'm having a problem.
> >
> > > > > First look at the problem.
> >
> > > > > I have the following element in my page:
> >
> > > > > 
> >
> > > > > Notice that it doesn't have name neither id attributes. When I try
> to
> > > > > get it using xpath:
> >
> > > > > browser.text_field(:xpath, "//
> > > > > inp...@tabindex='4901']").set("something")
> >
> > > > > I get the following error:
> >
> > > > > D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> > > > > element.rb:907:in `assert_exists': Unable to locate element,
> > > > > using :xpath, "//
> > > > > inp...@tabindex='4901']" (Watir::Exception::UnknownObjectException)
> > > > >from D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/
> > > > > firewatir/elements/text_field.rb:149:in `set'
> > > > >from waitir_adm_jp_1.rb:10
> >
> > > > > Watir can't find the element. But if I try to get other element
> that
> > > > > have id or name attributes using xpath (in the very same page) I
> can
> > > > > get it, without problems.
> >
> > > > > My guess is that Watir can't acess elements without name or id
> > > > > attribute, even if it isn't used in xpath query, the element must
> have
> > > > > it. Is it right? If not, where am I making mistake?
> >
> > > > > Thanks.
> >
> > > > > --
> > > > > Before posting, please readhttp://watir.com/support. In short:
> search
> > > > > before you ask, be nice.
> >
> > > > > You received this message because you are subscribed to
> > > > >http://groups.google.com/group/watir-general
> > > > > To post: watir-general@googlegr

Re: [wtr-general] Re: Watir xpath navigation problem

2010-05-06 Thread Felipe Knorr Kuhn
Hello,

That's weird. I noticed you're using Firefox, so I tested it under FF and it
worked as well:

require "rubygems"
require "watir"

@browser = FireWatir::Firefox.new

@browser.goto "file:///c:/teste.html"

@browser.text_field(:xpath, "//*...@tabindex='4901']").set "teste"

puts @browser.text_field(:xpath, "//*...@tabindex='4901']").value

>ruby input.rb
teste
>Exit code: 0

My environment:

Microsoft Windows XP [Version 5.1.2600]
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
(Fire)Watir 1.6.5

FK


On Thu, May 6, 2010 at 4:07 PM, Felipe Pedrini wrote:

> Hello, FK,
>
> Yes, it was I thought, a bug, but I came ask here just to confirm.
>
> I've tried the workaround, and I have no success. The error continues:
>
> D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> element.rb:907:in `assert_exists': Unable to locate element,
> using :xpath, "//*...@tabindex='4901']"
>  (Watir::Exception::UnknownObjectException)
>
> And, yes, my tabindex is unique. Do you have any other sugestion? I'm
> not a specialist in xpath queries.
>
> Thanks!
>
> On 6 maio, 15:42, Felipe Knorr Kuhn  wrote:
> > Hello, Felipe,
> >
> > It sure does look like a bug.
> >
> > A workaround would be using the wildcard selector like this:
> >
> > @ie.text_field(:xpath, "//*...@tabindex='4901']").set "test"
> >
> > Hopefully your tabindex property is unique to all elements :)
> >
> > Regards,
> >
> > FK
> >
> > On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini  >wrote:
> >
> >
> >
> > > Hi guys,
> >
> > > I'm evaluating Watir, and I'm trying to simple get an element using
> > > its XPath. But I'm having a problem.
> >
> > > First look at the problem.
> >
> > > I have the following element in my page:
> >
> > > 
> >
> > > Notice that it doesn't have name neither id attributes. When I try to
> > > get it using xpath:
> >
> > > browser.text_field(:xpath, "//
> > > inp...@tabindex='4901']").set("something")
> >
> > > I get the following error:
> >
> > > D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> > > element.rb:907:in `assert_exists': Unable to locate element,
> > > using :xpath, "//
> > > inp...@tabindex='4901']" (Watir::Exception::UnknownObjectException)
> > >from D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/
> > > firewatir/elements/text_field.rb:149:in `set'
> > >from waitir_adm_jp_1.rb:10
> >
> > > Watir can't find the element. But if I try to get other element that
> > > have id or name attributes using xpath (in the very same page) I can
> > > get it, without problems.
> >
> > > My guess is that Watir can't acess elements without name or id
> > > attribute, even if it isn't used in xpath query, the element must have
> > > it. Is it right? If not, where am I making mistake?
> >
> > > Thanks.
> >
> > > --
> > > Before posting, please readhttp://watir.com/support. In short: search
> > > before you ask, be nice.
> >
> > > You received this message because you are subscribed to
> > >http://groups.google.com/group/watir-general
> > > To post: watir-general@googlegroups.com
> > > To unsubscribe: 
> > > watir-general+unsubscr...@googlegroups.com
> 
> >
> >
> > --
> > Before posting, please readhttp://watir.com/support. In short: search
> before you ask, be nice.
> >
> > You received this message because you are subscribed tohttp://
> groups.google.com/group/watir-general
> > To post: watir-general@googlegroups.com
> > To unsubscribe: 
> > watir-general+unsubscr...@googlegroups.com
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Watir xpath navigation problem

2010-05-06 Thread Felipe Knorr Kuhn
Hello, Felipe,

It sure does look like a bug.

A workaround would be using the wildcard selector like this:

@ie.text_field(:xpath, "//*...@tabindex='4901']").set "test"

Hopefully your tabindex property is unique to all elements :)

Regards,

FK

On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini wrote:

> Hi guys,
>
> I'm evaluating Watir, and I'm trying to simple get an element using
> its XPath. But I'm having a problem.
>
> First look at the problem.
>
> I have the following element in my page:
>
> 
>
> Notice that it doesn't have name neither id attributes. When I try to
> get it using xpath:
>
> browser.text_field(:xpath, "//
> inp...@tabindex='4901']").set("something")
>
> I get the following error:
>
> D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> element.rb:907:in `assert_exists': Unable to locate element,
> using :xpath, "//
> inp...@tabindex='4901']" (Watir::Exception::UnknownObjectException)
>from D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/
> firewatir/elements/text_field.rb:149:in `set'
>from waitir_adm_jp_1.rb:10
>
> Watir can't find the element. But if I try to get other element that
> have id or name attributes using xpath (in the very same page) I can
> get it, without problems.
>
> My guess is that Watir can't acess elements without name or id
> attribute, even if it isn't used in xpath query, the element must have
> it. Is it right? If not, where am I making mistake?
>
> Thanks.
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Vapir

2010-05-05 Thread Felipe Knorr Kuhn
Charley,

I don't know if I'm able to help with the merging because I would probably
break everything, unless the unit tests are covering most part of the code
:)

Also, I have never worked as a coder in a project this big, but it could be
a good time to try :)

Since there are lots of changes, perhaps we could try to check which ones
are the most important to the users, easier to merge, etc, and then start
from there. What do you think, Ethan and devs?

>From my point of view, the changes I would use the most are:

- Element#text
- Element#inner_html / outer_html
- Class names section

and obviously, the new Model dialogs support.

I know it certainly isn't simple as that.

How active is the Watir development nowadays? If a release is not near, the
core devs could focus on merging the most wanted features from Vapir.

FK


On Wed, May 5, 2010 at 4:00 PM, Charley Baker wrote:

> Felipe,
>
>   We'd talked about merging some changes into the current Watir 1.x path.
> As Ethan mentioned, there are quite a lot of changes and not enough people
> currently to merge them back in. Hopefully with some time and ideally with
> pull requests as they can be broken out, I'd love to see some of these
> things merged. It requires a lot of work and discussion on the Watir
> development list, and most of us haven't had the time. I'm definitely in
> flux at this point since I've just left the Gap after 8 years.
>
>  That being said, if you have some time to contribute and this is certainly
> one way to do it. We're always looking for pull requests for improvements.
>
> Cheers,
>
> Charley
>
>
>
> On Wed, May 5, 2010 at 12:29 PM, Ethan  wrote:
>
>>
>>
>> On Wed, May 5, 2010 at 14:14, Felipe Knorr Kuhn  wrote:
>>
>>> Hello, Ethan,
>>>
>>> Congratulations, it looks very promising :)
>>>
>>> Even though I understand it's a fork, what can we expect from now on?
>>>
>>
>> To start with, hopefully, improved documentation. I have a backlog of
>> features I want to implement, which I'll post somewhere, when I have time.
>> And of course fixing bugs, which I'm sure will be encountered.
>>
>>
>>> I liked most of the differences pointed in the Wiki, and I believe others
>>> will like them too, so why not make them to the main Watir project?
>>>
>>
>> Some of them may be merged back into Watir, but some changes rely on major
>> changes that I've made to the internals which probably won't be merged back
>> into Watir.
>>
>>
>>> Will there be a new user group to support the new project?
>>>
>>
>> Yes, I've set up mailing list, bug tracker, wiki, all the usual good
>> things projects have, and they're linked at the main site,
>> http://vapir.org/
>>
>>
>>> Will you be able to incorporate future Watir features quickly? :)
>>>
>>
>> I plan to.
>>
>> -Ethan
>>
>>
>>  --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> You received this message because you are subscribed to
>> http://groups.google.com/group/watir-general
>> To post: watir-general@googlegroups.com
>> To unsubscribe: 
>> watir-general+unsubscr...@googlegroups.com
>>
>
>  --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] time loop

2010-05-05 Thread Felipe Knorr Kuhn
http://rufus.rubyforge.org/rufus-scheduler/

On Wed, May 5, 2010 at 3:36 PM, Shlomit Gazit wrote:

> How can I create a loop for a test to run every 15 minutes?
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Vapir

2010-05-05 Thread Felipe Knorr Kuhn
Hello, Ethan,

Congratulations, it looks very promising :)

Even though I understand it's a fork, what can we expect from now on?

I liked most of the differences pointed in the Wiki, and I believe others
will like them too, so why not make them to the main Watir project?

Will there be a new user group to support the new project?

Will you be able to incorporate future Watir features quickly? :)


FK


On Wed, May 5, 2010 at 2:47 PM, Ethan  wrote:

> Dear Watir people,
> I am happy to announce the release of the Vapir library, which is a
> fork of Watir and FireWatir.
>
> It is documented primarily at the github wiki at
> http://wiki.github.com/vapir/vapir/
> Documentation is sorely lacking at the moment, and improving it is my
> highest priority, but putting the code out for people to use preceded
> that.
>
> Links to other aspects of the forked project are listed at
> http://vapir.org/
>
> The API is in most cases the same, with some changes where I felt it
> was best; these are enumerated at
> http://wiki.github.com/vapir/vapir/differences-from-watir-api
>
> It is a release candidate currently, and can be installed using the
> --pre flag to rubygems (rubygems 1.3.6 is required; run gem update
> --system if you are on an earlier version).
> gem install --pre vapir-firefox
> gem install --pre vapir-ie
>
> Major improvements over Watir are:
> - Modal dialog API which is (mostly) consistent between IE and Firefox
> - http://wiki.github.com/vapir/vapir/modal-dialogs
> - Unified codebase for both Firefox and IE interaction - basically,
> everything that works in IE works in Firefox as well, which is not the
> case with FireWatir.
> - Many bug fixes and feature enhancements for issues in Watir's issue
> tracker, which will be documented more thoroughly on the wiki in the
> coming days.
>
> I would encourage any questions or discussion to go to Vapir's mailing
> list, not Watir's. The forked project is intended to stand on its own,
> separate from the Watir library due to a great deal of changes in the
> codebase which make it to some degree (a small degree, hopefully)
> incompatible. Support will be on Vapir's mailing list at
> http://groups.google.com/group/vapir
>
> -Ethan
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Watir connection to oracle

2010-05-04 Thread Felipe Knorr Kuhn
Hello, Ivan,

I used this piece of code under Windows a while ago:

require 'oci8'
require 'dbi'

connection = OCI8.new( 'username', 'password', 'ip:port/scheme')
cursor = connection.exec('select * from table')
while r = cursor.fetch_hash
  r.each {|key, value| puts "#{key} is #{value}" }
end
puts cursor.row_count
cursor.close
connection.logoff

You will to install the Oracle Client and the following lib:

ruby-oci8 (2.0.1)
Ruby interface for Oracle using OCI8 API

Hope that helps,

FK

On Tue, May 4, 2010 at 11:17 AM, Ivan Chung  wrote:

> Hi guys,
>
> some quick question here, i will need to connect to oracle database
> and execute some queries to compare the results. Is there a specif
> watir scripts to do that or that is ruby code to handle this?
>
> Appreciate if there is example provided.
>
> Thanks in advance
> Ivan
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] getting data from a cell within a based on text value

2010-05-03 Thread Felipe Knorr Kuhn
Hello,

You can use a XPath expression to get to the element you want.

This worked for me, using the HTML piece of code you provided:

--

require "rubygems"
require "watir"

@ie = Watir::IE.new

@ie.goto "file://c:/test.html"

@text = @ie.element_by_xpath("//span[contains(.,'Test
1')]/following::td[1]")

puts @text.innerText

---

Regards,

FK

On Mon, May 3, 2010 at 5:12 PM, watirRookie  wrote:

> hi,
> I want to get to the cell value (Pass, Fail, Blocked) based on the
>  values (Test 1, Test 2, Test 3) inside the divs.
> I can not use id's like div(:id, "node1") because the id's are dynamic
> and change often. The only way is to use the text inside the  to
> identify a particular  and then calling table on that div to get
> to the cell value.
>
> I can identify a particular  based on  text value but then
> can not call table on that. Can someone please help!
>
> 
> Test 1
>
>  Pass
>
> 
> 
> Test 2 
>
>  Fail
>
> 
> 
> Test 3 
>
>  Blocked
>
> 
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: How do I grab parameters from a dynamic URL?

2010-04-29 Thread Felipe Knorr Kuhn
Hello, John,

If you're not comfortable with installing another library, you could use
standard Ruby functions to achieve it.

p @url.split("/").last.split("&").first.gsub("index?ticket=", "")

It's ugly and could break, so don't rely on it :)

Good luck,

FK

On Thu, Apr 29, 2010 at 2:33 PM, John Williams  wrote:

> Thanks, Felipe. I'll give that a try. I was curious if there are any
> native methods in Watir I could use, like xpath?
>
> Cheers,
> John
>
> On Apr 29, 9:57 am, Felipe Knorr Kuhn  wrote:
> > Hello, John,
> >
> > You can use the Addressable library (http://addressable.rubyforge.org/
>  or
> > gem install addressable ) then use the following:
> >
> > @url = Addressable::URI.parse(@ie.url)
> >
> > @ticket = @url.query_values["ticket"]
> >
> > p @ticket
> >
> > Hope that helps,
> >
> > FK
> >
> >
> >
> >
> >
> > On Thu, Apr 29, 2010 at 1:35 PM, John Williams 
> wrote:
> > > I'm using Watir in IE to test a website where many URLs are
> > > dynamically generated with a unique ticket parameter. How do I grab
> > > this ticket parameter from the URL once I get to the page?
> >
> > > For example, when I use Watir to go to a URL like:
> >
> > >http://www.mydomain.com
> >
> > > I end up on a page with dynamically generated parameters like this:
> >
> > >http://www.mydomain.com/index?ticket=86aa224f8ac26fd9543075f992c29f1c.
> ..
> >
> > > How do I get this dynamcially generated URL so that I can put together
> > > and go to additional dynamically generated URLs using the same ticket
> > > parameter?
> >
> > > Thanks,
> > > John
> >
> > > --
> > > Before posting, please readhttp://watir.com/support. In short: search
> > > before you ask, be nice.
> >
> > > You received this message because you are subscribed to
> > >http://groups.google.com/group/watir-general
> > > To post: watir-general@googlegroups.com
> > > To unsubscribe: 
> > > watir-general+unsubscr...@googlegroups.com
> 
> >
> > --
> > Before posting, please readhttp://watir.com/support. In short: search
> before you ask, be nice.
> >
> > You received this message because you are subscribed tohttp://
> groups.google.com/group/watir-general
> > To post: watir-general@googlegroups.com
> > To unsubscribe: watir-general+unsubscr...@googlegroups.com- Hide quoted
> text -
> >
> > - Show quoted text -
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] How do I grab parameters from a dynamic URL?

2010-04-29 Thread Felipe Knorr Kuhn
Hello, John,

You can use the Addressable library ( http://addressable.rubyforge.org/  or
gem install addressable ) then use the following:

@url = Addressable::URI.parse(@ie.url)

@ticket = @url.query_values["ticket"]

p @ticket

Hope that helps,

FK

On Thu, Apr 29, 2010 at 1:35 PM, John Williams  wrote:

> I'm using Watir in IE to test a website where many URLs are
> dynamically generated with a unique ticket parameter. How do I grab
> this ticket parameter from the URL once I get to the page?
>
> For example, when I use Watir to go to a URL like:
>
> http://www.mydomain.com
>
> I end up on a page with dynamically generated parameters like this:
>
>
> http://www.mydomain.com/index?ticket=86aa224f8ac26fd9543075f992c29f1c83e77958&randnum=034d28
>
> How do I get this dynamcially generated URL so that I can put together
> and go to additional dynamically generated URLs using the same ticket
> parameter?
>
> Thanks,
> John
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Saving Javascript Files

2010-04-14 Thread Felipe Knorr Kuhn
Hello Paul,

I faced that problem writing my own spider some time ago.

At least he knows how to start his own now :)

FK

On Wed, Apr 14, 2010 at 5:37 PM, Paul Rogers  wrote:

> I dont think its quite that simple, as the scripts and css can be relative
> paths, or use the  tag ( something like that anyway )
>
> Ive recently written a spider  to do some similar things, and the number of
> gotchas is surprisingly high.
>
> Paul
>
> On Wed, Apr 14, 2010 at 2:32 PM, Felipe Knorr Kuhn wrote:
>
>> Hello,
>>
>> I would sugest you to use element_by_xpath to get all 

Re: [wtr-general] Saving Javascript Files

2010-04-14 Thread Felipe Knorr Kuhn
Hello,

I would sugest you to use element_by_xpath to get all 

Re: [wtr-general] Error displayed in accessing open office spread sheet

2010-03-11 Thread Felipe Knorr Kuhn
Use the roo or odf libraries to handle Open Office files.

http://roo.rubyforge.org/
http://rubyforge.org/projects/rubyodf/

On Thu, Mar 11, 2010 at 10:23 AM, ayyappa  wrote:

> I am trying to access the open office spreadsheet, using below script
> but following error is displayed.kindly can any one help me to over
> come. Thanks in advance
> require 'win32ole'
> require 'rubygems'
>
>
> noArgs = []
> file_uri = "file:///D:/ruby/example.ods"
>
> serviceManager = WIN32OLE.new("com.sun.star.serviceManager")
> coreReflection =
> serviceManager.createInstance("com.sun.star.reflection.CoreReflection")
> desktop = serviceManager.createInstance("com.sun.star.frame.Desktop")
> #spreadsheet = stardesktop.loadComponentFromURL("private:factory/
> scalc", "_blank", 0, noArgs)
> spreadsheet = desktop.loadComponentFromURL(file_uri , "_blank", 0,
> noArgs)
> sheetsCollection = spreadsheet.Sheets
> sheet1 = sheetsCollection.getByIndex(0)
> cellA1Formula = sheet1.getCellByPosition(0, 0).Formula # Gets text or
> number or whatever is in the cell
> cellA1NumericValue = sheet1.getCellByPosition(0, 0).Value # Gets
> numericalvalue of the cell
> cell1A = sheet1.getCellByPosition(0, 0) # Gets cell 1A
> cell1A.Formula = "Nathan Lane" # Sets the formula for cell 1A to
> "NathanLane"
>
> Output :
> 
> excel.rb:12:in `method_missing': loadComponentFromURL
> (WIN32OLERuntimeError)
>OLE error code:1001 in [automation bridge]
>  com.sun.star.lang.IllegalArgumentException: URL seems to be an
> unsupported one.
>HRESULT error code:0x80020009
>  Exception occurred.   from excel.rb:12
> >Exit code: 1
>
> --
> Before posting, please read http://watir.com/support. To sum it up: search
> before you ask, be nice.
>
> 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
> 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
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Answering incomplete requests

2010-03-05 Thread Felipe Knorr Kuhn
Done,

I had to reset password first because I haven't logged in ages. :)

FK

On Fri, Mar 5, 2010 at 9:47 AM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Fri, Mar 5, 2010 at 1:41 PM, Felipe Knorr Kuhn 
> wrote:
> > Regarding the "Why isn't my question being answered?" section, could you
> add links to the "How to handle popups" Wiki page in the 4th paragraph?
>
> Would you please do that yourself? It is just a wiki page, everybody can
> edit it. Please let me know if you need help with the wiki.
>
>
> Željko
>
> --
> 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
>

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


Re: [wtr-general] Re: Answering incomplete requests

2010-03-05 Thread Felipe Knorr Kuhn
Hello,

Regarding the "Why isn't my question being answered?" section, could you add
links to the "How to handle popups" Wiki page in the 4th paragraph?

FK

On Fri, Mar 5, 2010 at 8:19 AM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Tue, Nov 3, 2009 at 5:49 PM, Bret Pettichord 
> wrote:
> > I think we need a page called "Support" at http://watir.com/
> > It should include Watir General, IRC, Jira and Stack Overflow.
>
> Done. The page is not finished yet, I will work more on it next week.
> Feedback is welcome.
>
> Željko
>
> --
> 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
>

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


Re: [wtr-general] Re: Question about automation Gmail with Watir

2010-02-25 Thread Felipe Knorr Kuhn
Google engineers might be using Watir to test their upcoming Gmail Labs
apps!

j/k :)

FK

On Thu, Feb 25, 2010 at 7:42 PM, Alister Scott wrote:

> It makes sense to get rid of the Gmail example, because why you would
> ever want to automated a GUI to send an email is the question.
> It is *so* easy to send an email through ruby itself.
>
> On Feb 24, 7:56 pm, Željko Filipin 
> wrote:
> > On Tue, Feb 23, 2010 at 9:12 PM, Bill Agee  wrote:
> > > I suggest we remove the gmail wiki page.
> >
> > Done.
> >
> > Željko
>
> --
> 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
>

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


Re: [wtr-general] Re: Watir ads at stackoverflow.com

2010-02-05 Thread Felipe Knorr Kuhn
Vote up requires 15 reputation :(


On Fri, Feb 5, 2010 at 10:13 AM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> Want to see Watir ads on stackoverflow.com? This answer needs five
> upvotes. Current status: 0/5. http://bit.ly/djPPfj
>
> Željko
>
>  --
> 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
>

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


Re: [wtr-general] WatiN versus WatiR

2010-01-21 Thread Felipe Knorr Kuhn
Hello,

I don't know much about Watin, its development or user groups, but I would
say that if your project does not REQUIRE you to use Watin, learning Ruby
and Watir would be a very good thing to do :)

The community support here is awesome!

Currently I'm working on a project that required me to use Selenium instead
of Watir, so I had to dust off my Java skills and use Selenium RC with a
framework called TestNG :)

Just my 2 cents

FK

On Wed, Jan 20, 2010 at 7:27 PM, .WatiNNewbie  wrote:

> Hi,
>
> I'm exploring WatiN right now, but am having problems getting the
> support I need (e.g. code samples, mailing list, etc.). So, I am
> beginning to feel a bit reluctant about using it. I come from a .Net
> background, thus my preference for WatiN.
>
> Can anyone here tell me the difference between WatiN and WatiR? Is
> WatiN a .Net port of WatiR? Can I just learn WatiR and apply the same
> concept to WatiN (this is something I can do with Lucene.Net, the .Net
> port of Java Lucene)?
>
> --
> 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
>

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

Re: [wtr-general] Re: Please donate to the Watir project!

2010-01-13 Thread Felipe Knorr Kuhn
Željko,

The donations for bugs idea is great.

I remember the Mantis project having something similar for feature requests,
but I don't think it ever worked.

There were several donations for a "multi user issue assignment" feature
that never got implemented.

I'll donate next month :)

FK

On Wed, Jan 13, 2010 at 3:32 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Wed, Jan 13, 2010 at 6:27 PM, jw  wrote:
> > I encourage you to mention donations monthly.  I will be donating soon
> > and only realized it was an option because of this post.
>
> In that case, will do.
>
>
> > I don't know
> > if you or Tiffany will profit from it but you definitely should! : )
>
> Watir contributors do not get any money, it will be used for paying the
> hosting, domains and stuff like that.
>
> If we get a lot of donations, it would be great if we could pay somebody to
> develop some code, write some documentation (a book maybe)...
>
> Maybe we should accept donations for bugs. If you donate money and say you
> would like a bug to be fixed, the bug goes up in to-do list. :)
>
> Željko
>
> --
> 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
>
-- 
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

Re: [wtr-general] Wătir

2009-12-09 Thread Felipe Knorr Kuhn
Željko,

I have installed Ruby+Watir for people who are very talented programmers but
do not speak English, so I have adopted the Portuguese pronunciation with
them.

The correct pronunciation is not so important to me, I prefer spreading the
word about the tool than teaching people how to call it properly :)

Pronunciation can be confusing even for natives, so I think there shouldn't
be a long discussion about this.

Did you know people discussed whether C# was pronounced as "See Sharp" or
"See Hash" when it was announced? :)

FK

On Wed, Dec 9, 2009 at 8:56 AM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Wed, Dec 9, 2009 at 12:47 PM, Felipe Knorr Kuhn 
> wrote:
> > I don't know if this would work for the international community :)
>
> True. I would not know how to pronounce Wătir too.
>
>
> > I have heard people here in Brazil pronouncing it as "Wah-cheer", it's
> hard to tell people it's pronounced as "Water" :)
>
> You want to say that people using Watir do not know English? When I think
> about it, it makes sense.
>
> Maybe we should record Bret saying something like this. :)
>
> http://www.paul.sladen.org/pronunciation/
>
> Željko
>
>  --
> 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
>

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

Re: [wtr-general] Wătir

2009-12-09 Thread Felipe Knorr Kuhn
Hello,

I don't know if this would work for the international community :)

I have heard people here in Brazil pronouncing it as "Wah-cheer", it's hard
to tell people it's pronounced as "Water" :)

FK

2009/12/9 Željko Filipin 

> Bret suggested we should add breve accent over the "a" in "watir" so people
> would easily know how to pronounce it.
>
> What do you think?
>
> More information:
>
>
> http://ruby5.envylabs.com/episodes/32-episode-31-december-1-2009/stories/251-watir-1-6-5-has-been-released
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
>
>
>
>
>  --
> 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

-- 
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: user experience response time script.

2009-08-11 Thread Felipe Knorr Kuhn
Hello Maumita,

As Tony said, you should probably stick to JMeter.

But, if you really want to do that quickly with Ruby, you could try the
following:

t1 = Time.now

< Navigate through the site >

t2 = Time.now

puts "time taken: " + t2-t1.to_s + " seconds"


FK

On Tue, Aug 11, 2009 at 9:25 AM, Tony  wrote:

>
> Hi Maumita,
>
> The scenario you have described here is performance testing the
> shopping website.
> Would suggest you use jmeter or another performance test tool to do
> this.
>
> Watir is best used for functional testing.
>
> Thanks,
> Tony
> >
>

--~--~-~--~~~---~--~~
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: Pick pop-up text and oracle DB connectivity issue

2009-07-31 Thread Felipe Knorr Kuhn
Hello,

I forgot the following include

require 'win32/registry'

FK

On Fri, Jul 31, 2009 at 8:06 AM, Dheeraj Gambhir <
checktestingthi...@gmail.com> wrote:

> Felipe:
>
> I tried this and got this error:
>
> C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependenci
> es.rb:440:in `load_missing_constant': uninitialized constant
> Win32::Registry (Na
> meError)
> from
> C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_suppo
> rt/dependencies.rb:80:in `const_missing'
> from ./picktextpop.rb:16:in `click_window_button'
> from testpicktextpop.rb:19
>
>
> My code goes like:
>
>
>
>
> ##
> #includes
>require 'watir'
>require 'win32ole'
>require 'watir/ie'
>require 'watir\contrib\enabled_popup'
>require 'picktextpop'
>
># open the IE browser
>ie = Watir::IE.new
>test_site='
> https://secure.qa2.mlb.com/enterworkflow.do?flowId=registration.ajax.wizard&c_id=mlb
> '
>ie.goto(test_site)
>if ie.contains_text("MLB.com account")
>   ie.radio(:id, 'select_register').set
>   ie.text_field(:id, "register_email").set("ver...@mailinator.com")
>   ie.button(:id, "submit_btn").click_no_wait
>   click_window_button "The form was not submitted because of the
> following error(s).", "OK"
>   ie.waitForIE
>   else
> end
>
>
> And picktextpop contains:
>
> #Encoding
> $KCODE = "u"
> WIN32OLE.codepage = WIN32OLE::CP_UTF8
>
> require 'iconv'
>
> def converte str
>   Iconv.conv('CP1252', 'UTF-8', str)
> end
>
> # Click the button in the window with said text
> def click_window_button txtWindow, txtButton
>   # Find out IE version
>   reg_val = ''
>   key = 'Software\Microsoft\Internet Explorer'
>   Win32::Registry::HKEY_LOCAL_MACHINE.open(key) do |reg|
> reg_typ, reg_val = reg.read('Version')
>   end
>
>   @ie_ver, ie_ver2, ie_ver3, ie_ver4 = reg_val.split('.')
>   @autoit = WIN32OLE.new('AutoItX3.Control')
>
>   if (@ie_ver == "7")
> @windowCaption = "Windows Internet Explorer"
>   else
> @windowCaption = "Microsoft Internet Explorer"
>   end
>
>   # Wait for the popup
>   loop do
> sleep(5)
> @text = @autoit.ControlGetText(@windowCaption, "", "Static2")
> if (@text != nil)
>   @text = converte(@text)
>   puts "[INFO "  + Time.now.strftime("%H:%M:%S") + "] Text found: " +
> @text
> end
> if (@text == txtWindow)
>   puts "[INFO "  + Time.now.strftime("%H:%M:%S") + "] Clicking button -
> " + txtWindow
>   @autoit.ControlClick(@windowCaption,'', txtButton)
>   break
> end
>   end
>  end
>
>
> Please have a look and see if you can help further.
>
> When it clicked "Register" button, pop-up gets hides and it gives error on
> console.
>
>
>
> On Fri, Jul 31, 2009 at 3:53 PM, Dheeraj Gambhir <
> checktestingthi...@gmail.com> wrote:
>
>> Hey Felipe ,
>>
>> First of all big thnx for replying, i will try this code ASAP and then let
>> u know if stuck again.
>>
>> Regarding Oracle/Ruby connectivity, i faced too many issues but at last
>> had no option so uninstall and reinstall oracle client. From then onwards,
>> it is working fine. Fingers cross :)
>>
>>
>> Thnx once again.
>>
>>
>> On Thu, Jul 30, 2009 at 6:40 PM, Felipe Knorr Kuhn wrote:
>>
>>> Hello Dheeraj,
>>>
>>> I defined the function in the end of this message to click on button
>>> "txtButton" when the alert has text equal to "txtWindow"
>>>
>>> You call it with:
>>>
>>> @main.button(:name, "CONFIRM").click_no_wait
>>> clica_window_BUTTON "Are you sure do you want to confirm?", "OK"
>>> @ie.waitForIE
>>>
>>> The code that really matters to you is @text =
>>> @autoit.ControlGetText(@windowCaption, "", "Static2")
>>>
>>> Then you compare the @text string against what you want
>>> (@text.include?("Username required") for example)
>>>
>>> PS: Do you mind sharing 

[wtr-general] Re: Pick pop-up text and oracle DB connectivity issue

2009-07-30 Thread Felipe Knorr Kuhn
Hello Dheeraj,

I defined the function in the end of this message to click on button
"txtButton" when the alert has text equal to "txtWindow"

You call it with:

@main.button(:name, "CONFIRM").click_no_wait
clica_window_BUTTON "Are you sure do you want to confirm?", "OK"
@ie.waitForIE

The code that really matters to you is @text =
@autoit.ControlGetText(@windowCaption, "", "Static2")

Then you compare the @text string against what you want
(@text.include?("Username required") for example)

PS: Do you mind sharing what you've done to get Oracle working?

Hope that helps,

FK

--


CODE:

#Encoding
$KCODE = "u"
WIN32OLE.codepage = WIN32OLE::CP_UTF8

require 'iconv'

def converte str
  Iconv.conv('CP1252', 'UTF-8', str)
end

# Click the button in the window with said text
def click_window_button txtWindow, txtButton
  # Find out IE version
  reg_val = ''
  key = 'Software\Microsoft\Internet Explorer'
  Win32::Registry::HKEY_LOCAL_MACHINE.open(key) do |reg|
reg_typ, reg_val = reg.read('Version')
  end

  @ie_ver, ie_ver2, ie_ver3, ie_ver4 = reg_val.split('.')
  @autoit = WIN32OLE.new('AutoItX3.Control')

  if (@ie_ver == "7")
@windowCaption = "Windows Internet Explorer"
  else
@windowCaption = "Microsoft Internet Explorer"
  end

  # Wait for the popup
  loop do
sleep(5)
@text = @autoit.ControlGetText(@windowCaption, "", "Static2")
if (@text != nil)
  @text = converte(@text)
  puts "[INFO "  + Time.now.strftime("%H:%M:%S") + "] Text found: " +
@text
end
if (@text == txtWindow)
  puts "[INFO "  + Time.now.strftime("%H:%M:%S") + "] Clicking button -
" + txtWindow
  @autoit.ControlClick(@windowCaption,'', txtButton)
  break
end
  end
 end

On Thu, Jul 30, 2009 at 9:47 AM, Dheeraj Gambhir <
checktestingthi...@gmail.com> wrote:

>
> My bad Chuck, sorry for posting two problem at one go.
>
> Ruby/Oracle connectivity thing is working fine for me now.
>
> The only limitation pending is:
>
> On Login page, when we submit the form without entering
> "confirm password" value, it gives pop-up message i.e "Confirm
> Password- Entry Required.", same is the case with other validations.
>
> My requirement is to pick that pop-up message text.
>
> Is it possible?
>
> Please help if you can.
>
>
> On Jul 22, 9:44 pm, Chuck van der Linden  wrote:
> > Firstly, please do not ask two questions that are not related in a
> > single thread.  This is no different than asking a new unrelated
> > question in an existing thread.  it makes things much too confusing
> > for everyone, and harder for anyone coming here and searching for
> > answers to find what they need.
> >
> > You already have a thread about connecting to oracle, seek the answer
> > to that issue there instead of starting a duplicate thread on the same
> > subject which just fragments things and again makes it harder for
> > everyone.
> >
> > Secondly with regard to dealing with popups, did you read this
> > instruction?
> > 1. Before you ask anything, please search in the group at first, you
> > maygetgreat answers, that would save your time a lot.
> >
> >  how to deal with Pop-ups (responding to them, verifying the happened,
> > etc) is a topic that has been discussed at length in both the wiki/
> > tutorials  and also in very recent subject threads here in the group.
> > It is one of the MOST COMMON TOPICS discussed here.  So, 'The Answer
> > You Seek' (tm) is likely already here and you could have had it
> > already without having to wait (perhaps for someone in another
> > timezone who is currently sleeping when you post your message, who is
> > more than likely going to refer you to the existing thread that you
> > could have found yourself with just a little work on your part.)
> >
> > Don't keep posting the same thing over and over and over..  it
> won'tgetyou an answer any sooner.  If there was someone awake and able/
> > inclined to respond to your original posting they would have done so.
> > Posting again in an hour or two just means more stuff for people to
> > wade through.  Furthermore it's the kind of behavior that can cause
> > other folks to 'flip the twit bit' on you and write you off as some
> > kind of impatient idiot.
> >
> > SO, if you have searched, and read the tutorials, and tried the things
> > there, then please, Tell us what you've tried and what the results
> > were..  otherwise we're going to assume you've not even tried
> > searching, or will end up suggesting a lot of things you may have
> > already tried which wastes your and our time.
> >
> > Nobody is paid to respond here.. we all do it on our own time, and
> > after a while of answering the same questions over and over many folks
> > rapidlygetto a point where they are dis-inclined to help someone who
> > shows no signs of having tried to find the answer themselves, or solve
> > the problem themselves, or at the very least having done some basic
> > searches of the messages here in the group to see if their issue ha

[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Felipe Knorr Kuhn
Hello Jared,

I'm a software tester and my interest in Ruby started a few years ago when I
found out about Watir.

At some point I started a blog (in Portuguese) about "How to do  in
Ruby", which would be basically a repository of solutions to the problems I
came across, but it never took off.

People tend to be motivated by challenges, and once the challenge is over,
the interest in the problem is over as well. That includes documenting the
solution so other people can use it, too.

As you mentioned, the Ruby community is heavily targeted towards Rails
developers and I also suffered from this when trying to come up with things
like Oracle integration, parsing and generation of OpenOffice documents and
scheduled tasks.

I believe a ruby-testing group is not necessary, but rather a place with
code people can copy, paste and most importantly, learn.

Even though there are some examples on the wiki, "How do I click on popups?"
is still one of the most asked questions in this group. Why? Are the
examples outdated? Are people facing variants that the examples don't cover?


Perhaps we should start a new thread just to discuss how to share code and.

Regards,
FK

On Tue, Jul 21, 2009 at 7:02 PM, Jared Quinert  wrote:

>
> That's one point that I find interesting.  Once Ruby found its way into
> my toolkit, I've used it to hit databases, web services, parse xml,
> simulate flat-file responses from banks and more.  A lot of my watir
> scripts are simple integrations between data that I get from these other
> approaches.
>
> What do you think some of the factors are that stop people from trying
> other things? I have my own thoughts and experiences on this point, but
> am curious about what the barriers are for others (because maybe I need
> to start blogging more 'How to do  with Ruby' - I have permission to
> use some of my real code).
>
> Is there a need for a ruby-testing group?  Are there other groups that
> serve this need?  The people in the main ruby forums were frequently
> unable to help me, because they either use rails, and not much of the
> other ruby libraries, or they build their tools in their main production
> language (ie. Java).
>
> Jared
> http://www.software-testing.com.au/blog/
>
> Chuck van der Linden wrote:
> > You may also find a lot more folks who know about doing this sort of
> > thing in the main ruby forums than you will here where many of the
> > folks have never needed to connect to a db (or if they did it was
> > mysql or ms-sql) in order to test against a web UI.
> >
> > On Jul 21, 8:36 am, karim rayani  wrote:
> >
> >> you can also use the db2 library or the active record library they are
> >> better then the OCI8 stuff
> >>
> >> On Tue, Jul 21, 2009 at 7:14 PM, Dheeraj
> >>
> >>
> >>
> >>
> >>
> >> Gambhir wrote:
> >>
> >>
> >>> Hi,
> >>>
> >>> I am getting oci.dll missing error on running the code given by you:
> >>>
> >>> require 'oci8'
> >>>
> >>> connection = OCI8.new(mlbread,mlbread,MLBD)
> >>> sql = 'select * from bam_order.ec_invoice where
> >>> created_date>sysdate-2'
> >>>
> >>> connection.exec(sql) do |row|
> >>>  puts row
> >>> end
> >>>
> >>> Regards
> >>> D G
> >>>
> >>> On Jul 21, 6:25 pm, Ivan Kabluchkov  wrote:
> >>>
>  Installhttp://rubyforge.org/projects/ruby-oci8/
> 
>  And example of code:
> 
>  require 'oci8'
> 
>  connection = OCI8.new(, , )
>  sql = 'select * from table'
> 
>  connection.exec(sql) do |row|
> puts row
>  end
> 
>  On 21 июл, 17:06, Dheeraj Gambhir 
>  wrote:
> 
> > Hi All,
> >
> > I have tried my level best to connect to oracle using ruby but all in
> > vain.
> >
> > Can any one provide concrete steps to follow to do that.
> > Please list down what all we require for this.
> >
> > Thanks in advance.
> >
> > Regards
> > Dheeraj Gambhir
> >
> >> --
> >> Regards,
> >>
> >> Alkarim Rayani- Hide quoted text -
> >>
> >> - Show quoted text -
> >>
> > >
> >
> >
>
>
> >
>

--~--~-~--~~~---~--~~
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: Ruby/Oracle connectivity

2009-07-21 Thread Felipe Knorr Kuhn
Did you download and install the Instant Client as described in the guide?

 "Download at least two packages "Instant Client Package - *Basic*" and
"Instant Client Package - *SDK*" from Oracle Technology
Network
.

note: use 32-bit packages for 32-bit ruby even though the OS is 64-bit."


FK


On Tue, Jul 21, 2009 at 10:43 AM, Dheeraj Gambhir <
checktestingthi...@gmail.com> wrote:

>
> Hi,
>
> I am getting oci.dll missing error on running the code given by you:
>
>
> require 'oci8'
>
> connection = OCI8.new(mlbread,mlbread,MLBD)
> sql = 'select * from bam_order.ec_invoice where created_date>sysdate-2'
>
> connection.exec(sql) do |row|
>   puts row
> end
>
>
> Regards
> D G
>
> On Tue, Jul 21, 2009 at 6:55 PM, Ivan Kabluchkov wrote:
>
>>
>> Install http://rubyforge.org/projects/ruby-oci8/
>>
>> And example of code:
>>
>> require 'oci8'
>>
>> connection = OCI8.new(, , )
>> sql = 'select * from table'
>>
>> connection.exec(sql) do |row|
>>   puts row
>> end
>>
>>
>> On 21 июл, 17:06, Dheeraj Gambhir 
>> wrote:
>> > Hi All,
>> >
>> > I have tried my level best to connect to oracle using ruby but all in
>> > vain.
>> >
>> > Can any one provide concrete steps to follow to do that.
>> > Please list down what all we require for this.
>> >
>> > Thanks in advance.
>> >
>> > Regards
>> > Dheeraj Gambhir
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: Ruby/Oracle connectivity

2009-07-21 Thread Felipe Knorr Kuhn
Hello Dheeraj,

You need this library http://ruby-oci8.rubyforge.org/en/

The site explains all you need to set it up.

Regards,

FK


On Tue, Jul 21, 2009 at 10:06 AM, Dheeraj Gambhir <
checktestingthi...@gmail.com> wrote:

>
> Hi All,
>
>
> I have tried my level best to connect to oracle using ruby but all in
> vain.
>
> Can any one provide concrete steps to follow to do that.
> Please list down what all we require for this.
>
>
> Thanks in advance.
>
>
> Regards
> Dheeraj Gambhir
> >
>

--~--~-~--~~~---~--~~
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: Firefox 3.5 compatible with FireWatir?

2009-07-08 Thread Felipe Knorr Kuhn
Hello Angrez,

What are these tweaks you mentioned?

I have successfully compiled Firefox but like you said, I can't use the
generated XPI :)

Thanks,

FK

On Mon, Jul 6, 2009 at 4:01 AM, Angrez Singh  wrote:

> You need to build Firefox with the JSSh extension enabled. To create the
> XPI go to JSSh directory and say "make xpi" that will generate the XPI. The
> only problem with the generated XPI is that its format is compatible with
> only Firefox 1.5.x versions. We need to tweak the XPI (nothing but a zip
> file) a bit. Let me know if you need any help while compiling Firefox code.
>
> Thanks,
> Angrez
>
>
> On Fri, Jul 3, 2009 at 6:45 PM, Felipe Knorr Kuhn wrote:
>
>> Hello Angrez,
>>
>> To build the XPI, do you have to go through the whole Firefox building
>> process?
>>
>> I've seen guides to build Firefox+JSSh, but I don't know if it creates the
>> extension file separately or not :)
>>
>> I could try to build it for Linux.
>>
>> FK
>>
>>
>> On Fri, Jul 3, 2009 at 9:44 AM, Angrez Singh  wrote:
>>
>>> Sure let me know where it fails
>>>
>>>
>>> On Fri, Jul 3, 2009 at 5:28 PM, Gonza  wrote:
>>>
>>>>
>>>> Works fine! After testing it for a while I can tell you It works! I've
>>>> several TCs, if any fails because jssh, I'll let you know.
>>>>
>>>> Thanks,
>>>>
>>>> Gonza
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: Firefox 3.5 compatible with FireWatir?

2009-07-03 Thread Felipe Knorr Kuhn
Hello Angrez,

To build the XPI, do you have to go through the whole Firefox building
process?

I've seen guides to build Firefox+JSSh, but I don't know if it creates the
extension file separately or not :)

I could try to build it for Linux.

FK

On Fri, Jul 3, 2009 at 9:44 AM, Angrez Singh  wrote:

> Sure let me know where it fails
>
>
> On Fri, Jul 3, 2009 at 5:28 PM, Gonza  wrote:
>
>>
>> Works fine! After testing it for a while I can tell you It works! I've
>> several TCs, if any fails because jssh, I'll let you know.
>>
>> Thanks,
>>
>> Gonza
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: Firewatir and HighAscii

2009-06-30 Thread Felipe Knorr Kuhn
Hello,

I am using the following, found somewhere on the net (or even this list :)

$KCODE = "u"
WIN32OLE.codepage = WIN32OLE::CP_UTF8

require 'iconv'

module FireWatir
  class DD < NonControlElement
TAG='DD'
  end
  class DL < NonControlElement
TAG='DL'
  end
  class DT < NonControlElement
TAG='DT'
  end
  class STRONG < NonControlElement
TAG='STRONG'
  end
  class TextField
def doKeyPress( value )
  # do not ask me why
  value = Iconv.conv('CP1252', 'UTF-8', value)
  @o.value = value
  fire_key_events
end
  end
end


See if that helps

FK

2009/6/30 Loft_Tester 

>
> I saw a post asking for the same thing a year ago and it didn't get
> any responses so I would like to try asking again and maybe one of you
> out there could help.
>
> I am trying to read internationalized data in a text field.
> Field contents  =  Paço
> firewatir returns = Paço
>
> This all works fine in IE here's what I have tried from searching in
> this forum
> setting
> $KCODE='u'
>
> I have also tried
>
> require 'win32ole'
> WIN32OLE.codepage = WIN32OLE::CP_ACP #UTF8
>
> and have returned the same data
> to see that data in a field you can go to
>
> http://www.google.com/search?rlz=1C1GGLS_enUS311US311&aq=f&sourceid=chrome&ie=UTF-8&q=Paço
>
> thanks
>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: how to automatically save all the images from a webpage without the dialogs?

2009-06-12 Thread Felipe Knorr Kuhn
Can you run an external app like wget instead?

http://users.ugent.be/~bpuype/wget/

FK

2009/6/12 Encaps 

>
> Hello everybody,
>
> I try to save all the images from a webpage following this guide:
> http://wiki.openqa.org/display/WTR/Save+All+Images+on+a+Webpage
>
> require 'watir'
> browser = Watir::IE.new
> browser.goto('http://twitter.com')
> idx = 0
> browser.images.each do |x|
>  idx += 1
>  location = 'c:\tmp\file-' + idx.to_s + '.jpg'
>  x.save(location)
> end
>
> But the problem is IE ask to save any image, so I should specify
> location,file name, and click "Save".
> How to disable the dialogs to automatically save all the images from a
> batch script?
> Thanks.
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to delete a line in a file?

2009-06-12 Thread Felipe Knorr Kuhn
Hello,

I use the following in my scripts:

require "yaml"

@urls = YAML.load_file("urls.txt")
@url = @urls.delete_at(0)
File.open('urls.txt', 'w') do |out|
  YAML.dump(@urls, out)
end


FK

2009/6/12 Wesley Chen 

> Hi, Guys,
> I would like to read from a file, when I read a line, I would like to
> delete this line in the file, until all the file is read.
>
> Any suggestion would be quite appreciated.
>
> Thanks.
> Wesley Chen.
>
> >
>

--~--~-~--~~~---~--~~
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 application running on remote network

2009-06-09 Thread Felipe Knorr Kuhn
Have you tested interacting with the IE window launched by Citrix?

I believe it spawns just like a regular IE window, so you can use AutoIT to
launch Citrix and login, then launch your Watir scripts, attaching to that
window.

FK

2009/6/9 Rahul Ahuja 

>
> Hi,
>
> I am trying to automate a web application built on sharepoint
> technology.
>
> But, the application is available only on client network and hence I
> am not having access to the application on my local intranet.
>
> For accessing the application following steps are performed:
>
> 1. Login to remote network by using Citrix server.
> 2. Open the IE from the list of given applications.
> 3. Open the URL of AUT.
>
> Can someone please tell me whether WATIR supports automation of
> application which are running on remote network.
>
> NOTE: I am not logging into remote network using remote desktop or by
> accessing a remote machine.
>
> THanks in advance.
>
> Regards,
> Rahul
>
> >
>

--~--~-~--~~~---~--~~
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: xpath problems

2009-06-05 Thread Felipe Knorr Kuhn
Are you using Google in English or another language?

Adding this to your code might fix it

$KCODE = "u"
WIN32OLE.codepage = WIN32OLE::CP_UTF8

(or CP1252)

FK

2009/6/5 Miguel Argollo 

> HI,
>
> I´m just trying to start using xpath, so I decided to change the Google
> example in order to have some working code; I changed the
>
> ie.button(:name, "btnG").click # "btnG" is the name of the Search button
>
> line by
>
> ie.button(:xpath,"//inp...@name='btnG']/").click
>
> but I got this error msg:
>
>  Step 3: click the 'Google Search' button.
> c:/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:90:in `parse':
> # ception: Missing end tag for 'label' (got "span") (REXML::ParseException)
> Line:
> Position:
> Last 80 unconsumed characters:
> http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to send the email by Ruby script?

2009-06-05 Thread Felipe Knorr Kuhn
Sending attachments via net/smtp can be a pain. The following links are
outdated but might still be useful:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/130390

http://www.tutorialspoint.com/ruby/ruby_sending_email.htm

Please share your solution after you're done :)

FK

2009/6/5 Wesley Chen 

> But do you know how to send an attachment in the email?
>
>
> Thanks.
> Wesley Chen.
>
>
>
> On Sat, Jun 6, 2009 at 1:12 AM, Wesley Chen  wrote:
>
>> Hi, Felipe,
>> Thank you very much, it is really helpful, :).
>> There is a great contributor below.
>> http://notepad.onghu.com/2007/3/26/sending-email-with-ruby
>> When I run the code, anything goes expected.
>>
>> I have searched for the results for hours, your one word gets it fixed.
>> :), thank you again.
>>
>> Thanks.
>> Wesley Chen.
>>
>>
>>
>> On Sat, Jun 6, 2009 at 12:51 AM, Felipe Knorr Kuhn wrote:
>>
>>> Did you try the following?
>>>
>>> SMTP<http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/classes/Net/SMTP.html>Authentication
>>>
>>> The 
>>> Net::SMTP<http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/classes/Net/SMTP.html>class
>>>  supports three authentication schemes; PLAIN, LOGIN and CRAM MD5. (
>>> SMTP<http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/classes/Net/SMTP.html>Authentication:
>>>  [RFC2554]) To use
>>> SMTP<http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/classes/Net/SMTP.html>authentication,
>>>  pass extra arguments to
>>> SMTP.start<http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/classes/Net/SMTP.html#M001354>
>>> /SMTP#start<http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/classes/Net/SMTP.html#M001354>.
>>>
>>>
>>> # PLAIN
>>> Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
>>> 'Your Account', 'Your Password', :plain)
>>> # LOGIN
>>> Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
>>>
>>>
>>>
>>> 'Your Account', 'Your Password', :login)
>>>
>>> # CRAM MD5
>>> Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
>>> 'Your Account', 'Your Password', :cram_md5)
>>>
>>>
>>>
>>>
>>> 2009/6/5 Wesley Chen 
>>>
>>> Hi, Guys,
>>>> I can read my sina.com email by the following code:
>>>> require 'net/pop'
>>>> Net::POP3.foreach('*pop3.sina.com.cn*', 110,
>>>>   'my_em...@sina.com', 'my_password' ) do |email|
>>>>   hdr = email.header
>>>>   if hdr =~ /\d+/
>>>> language = hdr.to_s
>>>>   else
>>>> language = "INVALID"
>>>>   end
>>>>   puts language
>>>> end
>>>>
>>>> I would like to send email by *smtp.sina.com.cn*, there is code on the
>>>> net:
>>>>
>>>> Net::SMTP.start('smtp.sina.com.cn',25) do |smtp|
>>>>   smtp.send_message "hello", 'cjq_...@sina.com', ['cjq_...@sina.com']
>>>> end
>>>> But I get error message:
>>>> *e:/ruby/lib/ruby/1.8/net/smtp.rb:680:in `check_response': 530
>>>> Authentication required (Net::SMTPUnknownError)*
>>>>
>>>> So, how can make it I can send the email by the ruby code?
>>>>
>>>> Any suggestion would be quite appreciated.
>>>>
>>>> Thanks.
>>>> Wesley Chen.
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to send the email by Ruby script?

2009-06-05 Thread Felipe Knorr Kuhn
Did you try the following?

SMTPAuthentication

The 
Net::SMTPclass
supports three authentication schemes; PLAIN, LOGIN and CRAM MD5. (
SMTPAuthentication:
[RFC2554]) To use
SMTPauthentication,
pass extra arguments to
SMTP.start
/SMTP#start.


# PLAIN
Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
'Your Account', 'Your Password', :plain)
# LOGIN
Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
'Your Account', 'Your Password', :login)

# CRAM MD5
Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
'Your Account', 'Your Password', :cram_md5)



2009/6/5 Wesley Chen 

> Hi, Guys,
> I can read my sina.com email by the following code:
> require 'net/pop'
> Net::POP3.foreach('*pop3.sina.com.cn*', 110,
>   'my_em...@sina.com', 'my_password' ) do |email|
>   hdr = email.header
>   if hdr =~ /\d+/
> language = hdr.to_s
>   else
> language = "INVALID"
>   end
>   puts language
> end
>
> I would like to send email by *smtp.sina.com.cn*, there is code on the
> net:
>
> Net::SMTP.start('smtp.sina.com.cn',25) do |smtp|
>   smtp.send_message "hello", 'cjq_...@sina.com', ['cjq_...@sina.com']
> end
> But I get error message:
> *e:/ruby/lib/ruby/1.8/net/smtp.rb:680:in `check_response': 530
> Authentication required (Net::SMTPUnknownError)*
>
> So, how can make it I can send the email by the ruby code?
>
> Any suggestion would be quite appreciated.
>
> Thanks.
> Wesley Chen.
>
> >
>

--~--~-~--~~~---~--~~
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: Checking all links on a web page

2009-06-05 Thread Felipe Knorr Kuhn
Ash,

If you don't need to be authenticated in the app, this thread might help
you:

http://groups.google.com/group/watir-general/browse_thread/thread/26486904e89340b7?pli=1

Checking for the response code of the server is more reliable than looking
for some text :)

FK

2009/6/5 ash 

>
> Thanks for that Felipe.
>
> As far as validation goes I think my only option is to check that
> pages visited are not error pages; maybe checking for existnce of
> "page cannot be found" text.
>
> On Jun 5, 2:48 pm, Felipe Knorr Kuhn  wrote:
> > Hello,
> >
> > The code posted by Željko will work only if all your links are absolute.
> >
> > Try this:
> >
> > require "rubygems"
> > require "watir"
> >
> > $browser = Watir::Browser.new
> > $browser.goto "http://www.google.com";
> >
> > $links = Array.new
> >
> > $browser.links.each do |l|
> > #Relative link
> > if (l.href.first == "/")
> > $url = $browser.url + l.href[1..-1]
> > else
> > $url = l.href
> > end
> > if !$links.include?($url)
> > $links.push $url
> > end
> > end
> >
> > $links.each do |l|
> > $browser.goto l
> > #use your validation here...
> > end
> >
> > The code above will create an array of unique links and navigate through
> > them.
> >
> > How are you going to validate the pages?
> >
> > FK
>
> >
>

--~--~-~--~~~---~--~~
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: Checking all links on a web page

2009-06-05 Thread Felipe Knorr Kuhn
Hello,

The code posted by Željko will work only if all your links are absolute.

Try this:

require "rubygems"
require "watir"

$browser = Watir::Browser.new
$browser.goto "http://www.google.com";

$links = Array.new

$browser.links.each do |l|
#Relative link
if (l.href.first == "/")
$url = $browser.url + l.href[1..-1]
else
$url = l.href
end
if !$links.include?($url)
$links.push $url
end
end

$links.each do |l|
$browser.goto l
#use your validation here...
end

The code above will create an array of unique links and navigate through
them.

How are you going to validate the pages?

FK

2009/6/5 Željko Filipin 

> On Fri, Jun 5, 2009 at 2:33 PM, ash  wrote:
> > What I need is a way of clicking each link on a page to ensure they
> > don't error.
>
> I would do it something like this (not tested):
>
> browser.links.each do |link|
>   browser.goto link
>   # check if page is ok
>   browser.back
> end
>
> Ž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: Towards migrating to Watir.com

2009-06-04 Thread Felipe Knorr Kuhn
Hello Alister,

I particularly host my websites and SVN server on Dreamhost.com.

They have a nice control panel to create and configure a lot of stuff,
including SVN and Wordpress.

Unfortunately, you guys seem to NEED Confluence and Jira, and they don't
host J2EE applications on the $5.95/month plan.

Do you guys have a community/open source project license for the Atlassian
apps?

FK

2009/6/4 Alister Scott 

>
>  Hi Everyone,
>  I have looked into many options and can't find a free/cheap
>  option to host Confluence for watir.com. Amazon EC2 will be at
>  least US$80 per month (~$1000 per year) so we would need to find
>  a sponsor for this. On top of this, we would need to configure
>  and maintain (backup) Confluence ourselves which is additional
>  effort.
>
>  In moving forward I have asked why we are wanting to do what
>  we're doing. I understand there are two main reasons:
>  1) The current site (http://wtr.rubyforge.org/) is old, hard to
>  update by multiple people, and not very dynamic, meaning the
>  information on here is often not up to date.
>  2) It is believed the openqa.org site is taking on a more
>  selenium focus and therefore Watir might be better hosted
>  elsewhere (dedicated instance).
>
>  One solution I propose is that we use wordpress.com as a CMS to
>  host watir.com (custom domain name mapping costs $10USD per
>  year) and besides this there is no charge for up to 3GB content
>  and unlimited traffic.
>
>  The benefit of using wordpress.com is that it is very fast, has
>  a high google pagerank, is very easy to configure and use, and
>  allows multiple authors for the site.
>
>  I have set a very quick demo here:
>  http://watirweb.wordpress.com/ The great thing is that the site
>  has RSS feeds, and using the widgets we can display various
>  content dynamically.
>
>  This solves issue 1 above, but the issue 2 still exists.
>
>  I personally think issue 2 has died down a bit of late, and that
>  we could possibly continue using openqa.org for the wiki and
>  JIRA for the immediate future, until something changes. We can
>  just link to this site from watir.com
>
>  I look forward to hearing your ideas and feedback about this.
>
>  Cheers,
>  Alister
>
> >
>

--~--~-~--~~~---~--~~
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: jssh (firefox) and unicode

2009-05-28 Thread Felipe Knorr Kuhn

Hello Frank,

I was having the same problem with portuguese characters and your code
solved all issues :)

Thanks for sharing.

FK

2009/5/14 Frank :
>
> Hallo,
>
> with the following code i got i working on Windows with IE and Firefox
> (for Linux you might need to omit or change the conversion to a
> different encoding than CP1252).
> The first part i got from the other thread "Watir utf-8 (japnese)
> support".
> It might not work for Japanese strings, because the Windows encoding
> does not contain these characters, but for European characters its
> fine.
> The additional elements (dd, dt, dl, strong) might be useful for you.
>
> Regards,
> Frank
>
> # set encoding
> $KCODE = "u"
> WIN32OLE.codepage = WIN32OLE::CP_UTF8
>
> require 'iconv'
>
> module FireWatir
>  class DD < NonControlElement
>    TAG='DD'
>  end
>  class DL < NonControlElement
>    TAG='DL'
>  end
>  class DT < NonControlElement
>    TAG='DT'
>  end
>  class STRONG < NonControlElement
>    TAG='STRONG'
>  end
>  class TextField
>    def doKeyPress( value )
>      # do not ask me why
>      value = Iconv.conv('CP1252', 'UTF-8', value)
>     �...@o.value = value
>      fire_key_events
>    end
>  end
> end
>
> On May 1, 2:57 pm, John Kolokotronis  wrote:
>> I'm having similar problems working with double byte unicode, like
>> Japanese and yes, I'm certain the problem is with the jssh extension -
>> unfortunately, I don't know of any real solution and given that jssh
>> is abandonware, it's very hard to get any help with it on any
>> platform. Unicode works for me when it comes to getting values from
>> the browser, e.g doing this on button with a Japanese value, will
>> work:
>>
>> @browser.button(:id, "btn_back").value.should == JapaneseString # I
>> have to load the string from an Excel sheet though to avoid problems,
>> so the assertion checks against a variable or constant that is loading
>> the string content from within the Excel file...
>>
>> But setting a text_field with unicode, like:
>>
>> @browser.text_field(:id, "whatever").set(JapaneseString) # again
>> loading the unicode string from Excel...
>>
>> results in garbage characters... The "value" method does not work
>> either:
>>
>> @browser.text_field(:id, "whatever").value = JapaneseString
>>
>> I'm not sure jssh can even be compiled with proper unicode support,
>> but I just don't know enough about it to be able to try on my own...
>> Sorry I didn't have any real solution for you...
>>
>> Regards,
>>
>> John
>>
>> On May 1, 12:54 am, Stacia  wrote:
>>
>> > I've been working all day to try to get unicode displayed in text
>> > fields properly. I've come to the conclusion that probably the JSSH
>> > socket connection doesn't support having unicode sent over it - is
>> > there anyone who can confirm this? I saw a fix for Chinese, but this
>> > was for IE, and other fixes involved ugliness like using Excel. Every
>> > time I try to send unicode data (encoded in various ways with
>> > different libraries) the output is always junk. Would building Firefox
>> > with JSSH support built in help at all?  (not that it's an easy option
>> > on windows, but still). I was trying to experiment with JSSH myself
>> > using my own telnet client, but I couldn't find a unicode friendly
>> > telnet client at all (not a good sign). I've tried everything: I
>> > changed the default encoding of Firefox to utf8, I tried nkf, iconv,
>> > and packing arrays of ints into unicode chars. All of these just
>> > output junk (although the last method I could write to text files
>> > fine) I've learned a lot about unicode in *Ruby* but if the problem is
>> > unicode over JSSH that's beyond me.
>>
>> > I also have rewritten the doKeyPressMethod for quite a while now, it
>> > looks like this:
>>
>> > class FireWatir::TextField
>> >   def doKeyPress( value )
>> >     @o.value = value
>> >     fire_key_events
>> >   end
>> > end
>>
>> > this solves the slow text input problem on linux. I don't care about
>> > inputting the text character by character, which may have caused an
>> > issue with the unicode. I tried just putting in some unicode at that
>> > low level by setting @o.value to a unicode value directly (not sure
>> > how to get even lower level at the JSSH level) and that didn't help.
>>
>> > Please, if I could just get a simple yes or no about whether this is
>> > even possible over JSSH, that would help a lot, thanks
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How can I open message in gmail inbox.

2009-05-26 Thread Felipe Knorr Kuhn

Did you try the basic (HTML) view as well?

It should be much easier to parse and interact with Watir.

FK

2009/5/26 tknv :
>
> hi et,.al.
> I'd like to open gmail message for test sending password is collect or
> not.
> That's why need to open message to see message body.
> Then I try that code below.
>
> ie = IE.attach(:url ,'http://mail.google.com/mail/?shva=1#inbox')
> canvas_frame = ie.frame(:id, 'canvas_frame')
>
> after above try below
>
> canvas_frame.span(:text, 'MymessageName').click
> but not works,watir click it,but not open message.(just MymessageName
> was yellow highlighten)
>
> and also try below.72 is MymessageName span index.
> canvas_frame.span(:index, 72).click
>
> and also try below
> canvas_frame.span(:index, 72).text.click
> This is error,not works
>
> How can I open?
>
> Thanks
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: WATiR DSL I Have been working on...update

2009-05-15 Thread Felipe Knorr Kuhn

If your mother language is not English, start/finish is much easier to
understand, too.

By the way, I'm considering forking your code and develop a portuguese
version of the DSL once it's stable. What do you think?

FK

2009/5/15 Chuck van der Linden :
>
> On May 5, 2:52 pm, "Ruf, Wadud"  wrote:
>> Aidy thanks for your comments.
>>
>> Setup/teardown makes more sense to developers, would it make more sense to
>> testers than start and finish?
>
> speaking as a tester:   Yes
>
>
> >
>

--~--~-~--~~~---~--~~
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: I want to ask a question about "test/unit" frame

2009-05-14 Thread Felipe Knorr Kuhn

Try adding

require "test/unit/assertions"
include Test::Unit::Assertions

2009/5/14 jingshi.wan...@alibaba-inc.com :
>
> Hi, all
>   when I run the following code
>
> require 'test/unit'
> class TC_Pram < Test::Unit::TestCase
>   def initialize(name)
>     @name=name
>   end
>   def test_array
>      puts assert_equal(2,@name[2])
>   end
> end
> tc=TC_Pram.new("wang")
> tc.test_array
>
> there will be the error information as follows
>
> c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:125:in `add_assertion':
> undefined method `add_assertion' for nil:NilClass (NoMethodError)
>  from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:494:in
> `_wrap_assertion'
>  from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:46:in
> `assert_block'
>  from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:83:in
> `assert_equal'
>  from test_unit.rb:7:in `test_array'
>  from test_unit.rb:11
>
>
> I don't know how to resolve it  so ,I hope to get your help
> here ,Thanks
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: The return of WTR-155 :)

2009-04-28 Thread Felipe Knorr Kuhn
Hello, Bret.

I wrote that comment two days after you resolved the issue, two years ago :)

Basically, the workaround iterates the open windows through the ShellWindows
object instead of Shell.Application

After some initial research, I found this
http://support.microsoft.com/default.aspx/kb/940998 to be only article close
to an explanation to this problem, but I'm using IE6 and not IE7.

Unfortunately, I'm not sure how to reproduce this bug as I used WinXP, Ruby
1.8.2 and Watir 1.5.1.1190 back then and the environment is completely
different this time (Win2K, Ruby 1.8.6 and Watir 1.6.2).

The Win32OLE exception was raised this time when I tried to attach to an
existing IE window with "@ie = Watir::IE.attach(:url, /10.200/)". Back then,
it happened after trying to create a new IE window with "@ie =
Watir::IE.new".

I'll install a virtual machine at home and investigate this problem further,
testing under different versions of Windows and IE.

FK

2009/4/28 Bret Pettichord 

>
> Could you please open up new ticket for this issue (in Jira)? Also could
> you provide instructions on how to reproduce your problem? I understand
> your workaround, but It is unclear to me what you are trying to do when
> you see this error and it is unclear to me whether this is something
> that any one else has seen.
>
> Thanks for your help with this.
>
> I must say that I missed your original comment, as it was attached to a
> closed ticket.
>
> Bret
>
> Felipe Knorr Kuhn wrote:
> > Hello,
> >
> > I have recently installed Ruby 1.8.6-26 and Watir 1.6.2 on a Windows
> > 2000 machine at work and when I tried to run a simple script that
> > attaches to an existing window, but I faced the same problem from 2
> > years ago:
> >
> > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:241:in
> > `method_
> > missing': Windows (WIN32OLERuntimeError)
> > OLE error code:80040154 in 
> >   
> > HRESULT error code:0x80020009
> >   Exception occurred.   from
> > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/
> > lib/watir/ie-class.rb:241:in `each'
> >
> > Notice that the problem occurs with ie-class.rb instead of watir.rb.
> >
> > The same workaround submitted 2 years ago to
> > http://jira.openqa.org/browse/WTR-155 did the trick again.
> >
> > By the way, I'm not being able to post to the OpenQA forums, so excuse
> > me if this is not the right place to post
> >
> > Thanks and regards,
> > FK
> >
> > >
>
>
> --
> Bret Pettichord
> CTO, WatirCraft LLC, www.watircraft.com
> Lead Developer, Watir, www.watir.com
> Blog, www.io.com/~wazmo/blog <http://www.io.com/%7Ewazmo/blog>
> Twitter, www.twitter.com/bpettichord
>
> Ask me about Watir training
> www.watircraft.com/training
>
>
> >
>

--~--~-~--~~~---~--~~
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] The return of WTR-155 :)

2009-04-28 Thread Felipe Knorr Kuhn
Hello,

I have recently installed Ruby 1.8.6-26 and Watir 1.6.2 on a Windows 2000
machine at work and when I tried to run a simple script that attaches to an
existing window, but I faced the same problem from 2 years ago:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:241:in
`method_
missing': Windows (WIN32OLERuntimeError)
OLE error code:80040154 in 
  
HRESULT error code:0x80020009
  Exception occurred.   from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/
lib/watir/ie-class.rb:241:in `each'

Notice that the problem occurs with ie-class.rb instead of watir.rb.

The same workaround submitted 2 years ago to
http://jira.openqa.org/browse/WTR-155 did the trick again.

By the way, I'm not being able to post to the OpenQA forums, so excuse me if
this is not the right place to post

Thanks and regards,
FK

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