[wtr-general] New to Ruby and Watir

2013-03-25 Thread akiaaqa
Hi, I am extremely new to Watir and Ruby . I have installed both and Ruby 
and Ruby Mine.  Would like to use it for automating the testing we are 
using for e-commerce site.
Can anyone please tell me how do i start my scripting? I have just created 
a project in ruby mine. Should i be creating a class file first?I would 
like to write a sample script first and see it running first. If  someone 
can direct to me to a documentation which i can use as guide, it would be 
really helpful.
Thanks,
Akiaa

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

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [wtr-general] New to Ruby and Watir

2013-03-25 Thread Željko Filipin
On Sun, Mar 24, 2013 at 8:16 PM,  wrote:

> If  someone can direct to me to a documentation which i can use as guide,
> it would be really helpful.


Try entering this into google: watir

The first result is our web site, you should be able to find a lot of
documentation there.

Željko
--
https://leanpub.com/watirbook

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

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [wtr-general] New to Ruby and Watir

2013-03-25 Thread JOSEPH FLECK
Akiaa,

Here is a good starting point.
https://github.com/watir/watir/blob/master/README.md

Regards,
 Joseph Fleck

If your actions inspire others to dream more,
learn more, do more and become more,
you are a leader.
John Quincy Adams 





From: "akia...@gmail.com" 
To: watir-general@googlegroups.com
Sent: Mon, March 25, 2013 4:51:44 AM
Subject: [wtr-general] New to Ruby and Watir

Hi, I am extremely new to Watir and Ruby . I have installed both and Ruby and 
Ruby Mine.  Would like to use it for automating the testing we are using for 
e-commerce site.
Can anyone please tell me how do i start my scripting? I have just created a 
project in ruby mine. Should i be creating a class file first?I would like to 
write a sample script first and see it running first. If  someone can direct to 
me to a documentation which i can use as guide, it would be really helpful.
Thanks,
Akiaa
-- 
-- 
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
 
--- 
You received this message because you are subscribed to the Google Groups 
"Watir 
General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: watir in a rails app

2013-03-25 Thread Chuck van der Linden
I'm not sure what you are trying to do.  You've given us a single line of 
HTML, with an input field that has a (presumably unique if your team cares 
that their HTML is valid) ID value, yet your code is identifying most of 
the input fields by index within some other object.   Since I can't see any 
container objects in the HTML you gave, I can't tell which line of that 
code is trying to interact with the input field you gave.  All of which 
makes it very difficult to assist you.  Can you provide more of the HTML 
please, and indicate specifically which line in the code you presented is 
the one that is failing. 

On Sunday, March 24, 2013 10:29:48 AM UTC-7, hillary wrote:
>
> I'm currently trying to test my rails app using rspec and watir. But i'm 
> having problems filling out rails generated form fields. When I try to set 
> the field (using both set and value ==) I get the following error: 
> undefined method `set' for #. I also 
> get a similar error when trying to do when_present or flash. 
>
> I've setup my tests within the apps spec folder. When the test runs it's 
> starting up the test server. I'm using the following gems: rspec-rails, 
> waitr-rspec, watir-rails. 
>
> the html of the field i'm trying to set is : 
>
> 
>
> This is my spec: 
> require 'spec_helper'
>
> describe "TripTypes" do
>   before :all do
> goto "/"
>   end
>
>   it 'loads the form after clicking the "Add Type" Button' do
> link(:id, "add-trip-type").when_present.click
> form(:id, "new_trip_type").should be_visible
>   end
>
>   context "with Variable Options" do
>
> before :all do
>   @type_name = Faker::Lorem.sentence(2)
>   @field_one = Faker::Lorem.word
>   @field_two = Faker::Lorem.word
> end
>
> it "fills in the trip type name" do
>   text_field(:index, 0).set @type_name
> end
>
> it "adds the first field" do
>link(:id, "add-field").click
>tr(:index, 1).text_field(:index, 0).set @field_one
> end
>
> it "adds the variable field" do
>   link(:id, "add-field").click
>   tr(:index, 2).text_field(:index, 0).set @field_two
> end
>
> it "clicks Create Trip Type" do
>   button(:id, "create-trip-type").click
> end
>
> it "displays the trip type in the trip types table" do
>   div(:class, /alert-success/).should be_visible
>   div(:class, /alert-success/).text.should include "Successfully 
> created trip type."
>   table(:id, "trip-types-table").tr(:index, 1).td(:index, 
> 0).text.should == @type_name
> end
>   end
> end
>
>
> The first test is failing. The other two fields fill in tests are passing. 
> Both of the fields i can set are created using a jquery add_fields 
> function. 
>
> Also when i try to manually set the field on the standard rails server 
> :3000 it works fine.
>
> i'm not sure what's going on.  
>
>
>
>
>

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

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [wtr-general] New to Ruby and Watir

2013-03-25 Thread Chuck van der Linden
On Monday, March 25, 2013 5:26:32 AM UTC-7, j-f...@sbcglobal.net wrote:

> Akiaa,
>
> Here is a good starting point.
> https://github.com/watir/watir/blob/master/README.md
>
> Regards,
>  
> Joseph Fleck
>
> If your actions inspire others to dream more,
> learn more, do more and become more,
> you are a leader.
> John Quincy Adams 
>
> If you are just doing a simple proof of concept, and leaning to do some 
basic watir scripting, then you can just create your scripts as an RB file 
and execute them.

But once you get past the point of the basics, you will really want some 
kind of framework within which to run your tests. This can make it easier 
to run groups of tests, or a specific test, and also deal with issues like 
reporting results, and making it easier to automate the running of the test 
automation

 There are a number of good choices, but offhand I'd say two of the more 
popular ones are rspec and cucumber.  There are good books on both 
frameworks from Pragmatic Programmers, but neither specifically addresses 
using the frameworks with watir.. (still, I'd recommend reading the one 
that is applicable if you choose one of those as a framework) 

There was a good training session held last year at the Test Automation 
Bazaar on using Cucumber, Watir, and the Page-Objects gem, you can find a 
recording of it via this page. 
 https://github.com/watir/watir-bazaar/wiki/Test-Automation-Workshop-2012 
 apologies for the quality of the recording, you can blame that on me.

Other good starting resources are:
 1)  the Watir-Book  See the readme on this 
page https://github.com/watir/watirbook for more info
 2) Jeff "Cheesy" Morgan's Cucumber and Cheese 
book https://leanpub.com/cucumber_and_cheese

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

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [wtr-general] New to Ruby and Watir

2013-03-25 Thread Sohail Mirza
Hi Chuck van der Linden,
*
*
I have question for you *"How would rate Watir Test-Unit framework"? *In
your detailed reply you did not mention Test_Unit Framework? you dont like
or it has limitation..
i am asking so because i am currently using it and found it good.
please comment.
*
*
Thanks,
*
*
On Mon, Mar 25, 2013 at 8:21 PM, Chuck van der Linden <
cvanderlin...@climate.com> wrote:

> On Monday, March 25, 2013 5:26:32 AM UTC-7, j-f...@sbcglobal.net wrote:
>
>> Akiaa,
>>
>> Here is a good starting point.
>> https://github.com/watir/**watir/blob/master/README.md
>>
>> Regards,
>>
>> Joseph Fleck
>>
>> If your actions inspire others to dream more,
>> learn more, do more and become more,
>> you are a leader.
>> John Quincy Adams
>>
>> If you are just doing a simple proof of concept, and leaning to do some
> basic watir scripting, then you can just create your scripts as an RB file
> and execute them.
>
> But once you get past the point of the basics, you will really want some
> kind of framework within which to run your tests. This can make it easier
> to run groups of tests, or a specific test, and also deal with issues like
> reporting results, and making it easier to automate the running of the test
> automation
>
>  There are a number of good choices, but offhand I'd say two of the more
> popular ones are rspec and cucumber.  There are good books on both
> frameworks from Pragmatic Programmers, but neither specifically addresses
> using the frameworks with watir.. (still, I'd recommend reading the one
> that is applicable if you choose one of those as a framework)
>
> There was a good training session held last year at the Test Automation
> Bazaar on using Cucumber, Watir, and the Page-Objects gem, you can find a
> recording of it via this page.
> https://github.com/watir/watir-bazaar/wiki/Test-Automation-Workshop-2012 
> apologies for the quality of the recording, you can blame that on me.
>
> Other good starting resources are:
>  1)  the Watir-Book  See the readme on this page
> https://github.com/watir/watirbook for more info
>  2) Jeff "Cheesy" Morgan's Cucumber and Cheese book
> https://leanpub.com/cucumber_and_cheese
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re-run mechanism for cucumber+watir-webdriver

2013-03-25 Thread Alex Shtayer
Hi guys

Does somebody using any re-run mechanisms for failed test cases 
(not Continuous Integration approach)?

I need something like this:

Feature File

Scenario 1: Login
Given something
.

Scenario 2: Go_somewhere
Given something


.


Some scenario failed after execution

Create batch file

Put here: cucumber feature_file_name.feature:3:6:12:20 (where numbers are 
line numbers of failed test cases)
or
cucumber feature_file_name.feature:Login:Go_somewhere: 


Thanks a lot in advance,
Alex

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

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.