Re: [wtr-general] Iteration with data from excel

2014-03-21 Thread Raveendran P
Hi,

  Please review  CURF for your requirement --
http://raveendran.wordpress.com/2010/08/05/curf/



   - Demo Video - http://bit.ly/j_cuRF




On Thu, Mar 20, 2014 at 11:27 AM, akshaya vivek akshayavi...@gmail.comwrote:

 Hi
 I am new to ruby cucumber and watir
 How to run a scenario in watir many times with data from excel?
 There are 2 web pages which takes data from excel
 Each time it iterates it must take data from next row in excel
 And it must start and close the browser for each iteration.
 Please Help!!!

 --
 --
 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/d/optout.




-- 
Regards,
P.Raveendran
http://raveendran.wordpress.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

--- 
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/d/optout.


Re: [wtr-general] Clicking an empty Div with Watir

2014-03-21 Thread Raveendran P
Hi,

  add -- sleep 10 after

browser.element(:class, 'loginTwitter').click

I hope it will solve your problem


On Wed, Mar 19, 2014 at 11:36 PM, Oscar Rieken bis...@gmail.com wrote:

 http://watirwebdriver.com/browser-popups/


 On Wed, Mar 19, 2014 at 1:57 PM, Elad Shalom e...@devaffair.com wrote:

 Thanks, for your help.  I was told to quit that one and do a different
 POC.
 Should be very simple, but again - doesn't work.

 This should login to a website with Twitter.

 browser = Watir::Browser.start 'http://www.12mass.com/'
 browser.link(:class, 'priceLogin').click
 sleep 2
 browser.element(:class, 'loginTwitter').click
 browser.window.last.use do
 browser.text_field(:id, 'username_or_email').set 'name'
 browser.text_field(:id, 'password').set 'pass'

 browser.button(:id, 'allow').click
 end


 I get to a point where a new window opens, but I can't reach it and fill
 the credentials...

 --
 --
 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/d/optout.


  --
 --
 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/d/optout.




-- 
Regards,
P.Raveendran
http://raveendran.wordpress.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

--- 
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/d/optout.


Re: [wtr-general] How to call a function writen in ruby in an excel spreadsheet

2014-03-21 Thread Raveendran P
Hi,

  Please the ruby methods eval , send eta

And the third way is to use the eval method:
1
2
eval s.length #= 6
eval s.include? 'hi' #=true



On Fri, Jan 24, 2014 at 4:51 PM, nandish.shett...@gmail.com wrote:

 hi,
I have a ruby file with the code mentioned below,
   require 'watir-webdriver'
 require 'rspec/expectations'
 require 'spreadsheet'
 Spreadsheet.client_encoding = 'UTF-8'
 book = Spreadsheet::Workbook.new
 book = Spreadsheet.open 'path to my excel'


 @browser = Watir::Browser.new :firefox
 @browser.goto m https://main.airwatchdev.com/y url

 def textbox(obj_name, obj_value)
   @browser.text_field(:id = obj_name).set(obj_value)
 end

 i know, how to read an excel spreadsheet but when i use that and try to
 call the definition textbox from the excel sheet nothing happens. I just
 want to know if this is possible. Let me know in case more information is
 needed.

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




-- 
Regards,
P.Raveendran
http://raveendran.wordpress.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

--- 
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/d/optout.


Re: [wtr-general] How to call a function writen in ruby in an excel spreadsheet

2014-03-21 Thread Oscar Rieken
Not sure what reading from an excel has to do with watir.


On Fri, Mar 21, 2014 at 5:16 AM, Raveendran P jazzezr...@gmail.com wrote:

 Hi,

   Please the ruby methods eval , send eta

 And the third way is to use the eval method:
 1
 2
  eval s.length #= 6
  eval s.include? 'hi' #=true



 On Fri, Jan 24, 2014 at 4:51 PM, nandish.shett...@gmail.com wrote:

 hi,
I have a ruby file with the code mentioned below,
   require 'watir-webdriver'
 require 'rspec/expectations'
 require 'spreadsheet'
 Spreadsheet.client_encoding = 'UTF-8'
 book = Spreadsheet::Workbook.new
 book = Spreadsheet.open 'path to my excel'


 @browser = Watir::Browser.new :firefox
 @browser.goto m https://main.airwatchdev.com/y url

 def textbox(obj_name, obj_value)
   @browser.text_field(:id = obj_name).set(obj_value)
 end

 i know, how to read an excel spreadsheet but when i use that and try to
 call the definition textbox from the excel sheet nothing happens. I just
 want to know if this is possible. Let me know in case more information is
 needed.

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




 --
 Regards,
 P.Raveendran
 http://raveendran.wordpress.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

 ---
 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/d/optout.


-- 
-- 
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/d/optout.


Re: [wtr-general] Clicking an empty Div with Watir

2014-03-21 Thread Dan
Using sleeps is a bad idea.  There's plenty of wait methods available that 
do a much better job.  See here http://watirwebdriver.com/waiting/.

On Friday, March 21, 2014 5:10:08 AM UTC-4, jazze...@gmail.com wrote:

 Hi,

   add -- sleep 10 after 

 browser.element(:class, 'loginTwitter').click

 I hope it will solve your problem


 On Wed, Mar 19, 2014 at 11:36 PM, Oscar Rieken bis...@gmail.comjavascript:
  wrote:

 http://watirwebdriver.com/browser-popups/


 On Wed, Mar 19, 2014 at 1:57 PM, Elad Shalom e...@devaffair.comjavascript:
  wrote:

 Thanks, for your help.  I was told to quit that one and do a different 
 POC.
 Should be very simple, but again - doesn't work.

 This should login to a website with Twitter.

 browser = Watir::Browser.start 'http://www.12mass.com/'
 browser.link(:class, 'priceLogin').click
 sleep 2
 browser.element(:class, 'loginTwitter').click
 browser.window.last.use do
 browser.text_field(:id, 'username_or_email').set 'name'
 browser.text_field(:id, 'password').set 'pass'
 
 browser.button(:id, 'allow').click
 end


 I get to a point where a new window opens, but I can't reach it and fill 
 the credentials... 

 -- 
 -- 
 Before posting, please read http://watir.com/support. In short: search 
 before you ask, be nice.
  
 watir-...@googlegroups.com javascript:
 http://groups.google.com/group/watir-general
 watir-genera...@googlegroups.com javascript:

 --- 
 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-genera...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.


  -- 
 -- 
 Before posting, please read http://watir.com/support. In short: search 
 before you ask, be nice.
  
 watir-...@googlegroups.com javascript:
 http://groups.google.com/group/watir-general
 watir-genera...@googlegroups.com javascript:

 --- 
 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-genera...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Regards,
 P.Raveendran
 http://raveendran.wordpress.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

--- 
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/d/optout.