[wtr-general] Re: Generate an automated excel report of birthdays today

2009-05-11 Thread Željko Filipin
On Wed, May 6, 2009 at 08:40, Vicky Goyal vikasrattango...@gmail.com
wrote:
 This is my link of webpage from where i need the table data and then
 have to insert into an excel sheet.
 $ie.link(:url, 'http://172.25.103.20/BCards/').click

I can not open it. I get Network Timeout error.

 Now after that i need to put the snippet code u have written..

If you run the code I have sent you, it will just work.

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



[wtr-general] Re: Generate an automated excel report of birthdays today

2009-05-06 Thread Vicky Goyal

Zelijko

am little confused here.
This is my link of webpage from where i need the table data and then
have to insert into an excel sheet.
$ie.link(:url, 'http://172.25.103.20/BCards/').click

Now from this html page i need to pick up the table value and insert
into an excel sheet, which i need to create first.
I have created this way.
# Create an instance of the Excel application object
xl = WIN32OLE.new('Excel.Application')
# Make Excel visible
xl.Visible = 1
# Add a new Workbook object
wb = xl.Workbooks.Add
# Get the first Worksheet
ws = wb.Worksheets(1)
# Set the name of the worksheet tab
ws.Name = 'Sample Worksheet'
# Save the workbook
wb.SaveAs('c:\temp\workbook.xls')

Now after that i need to put the snippet code u have written.. is that
so...
do we create CSV applicaion the same way, as i have created the excel,
(is thr different syntax)
and if possible, please do proper commenting of the code.

Step-1 go to webpage link from wehre i need to take bday data.. this
step i am done with
Step-2 create one csv or excel file.. what is code for creating csv
file.. i knw abt creation of excel but not csv
Step-3 take data from webpage in table format and insert in csv file..
how can i pick up the data and put
step-4 save the sheet and quit.

Step 2 and Step 3 , i am not able to relate
i have tried ur code but not working..



On May 5, 6:00 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, May 5, 2009 at 14:22, Vicky Goyal vikasrattango...@gmail.com
 wrote:

  Now i jus need to put

  M   Abdul Hakkim M.   75779   abdulhakkim_m   IHLD   MYSORE2STP
  M   Abhilash A. M.      70239    Abilash_293891  PRH2  PROGBLR15

  in excel sheet.

 This will create file b.csv. Let me know if you would like me to comment the
 code.

 ---

 b.csv

 ,M,Abdul Hakkim M.,75779,abdulhakkim_m,IHLD,MYSORE2STP
 ,M,Abhilash A. M.,70239,Abilash_293891,PRH2,PROGBLR15
 ,M,Abhilash B. S.,58330,abhilash_bs,FNAT,INFCITYPRK4
 ,M,Abhishek Anand Caleb T.,82077,abhishek_caleb,CMEX,INFCITYPRK2
 ,M,Abhishek Bhatnagar,,Abhishek_Bhatnagar01,PRCS,PROGPUN01
 ,M,Abhishek Gupta,51246,Abhishek_Gupta17,SI,HYD2STP

 ---

 b.rb

 require watir
 require csv

 b = Watir::IE.attach(:url, //) # I have the page already opened in browser

 b.table(:index, 1).rows.each do |row|
   text = row.cells.collect do |cell|
     cell.text
   end
   File.open(b.csv, a) do |file|
     CSV::Writer.generate(file) do |csv|
       csv  text
     end
   end
 end
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Generate an automated excel report of birthdays today

2009-05-05 Thread Željko Filipin
On Tue, May 5, 2009 at 08:18, Vicky Goyal vikasrattango...@gmail.com
wrote:
 if i need to generate an automated excel report from a webapplication,
 which shows list of bdays.

Can you show us the html of the page and watir code you have written to deal
with it so far?

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



[wtr-general] Re: Generate an automated excel report of birthdays today

2009-05-05 Thread Vicky Goyal

To be specific...
There is a webpage which dynamically generates the list of bdays.
it is employee list of a compnay.
the same list comes in a table format.
I have written simple WATIR script so far to reach that particular
page.

Now from that page i need to list down all the table content to xcel
sheet.
I got the script of creating an excel sheet.
But how should i insert those values (i am not getting the exact
syntax)

regds

On May 5, 2:15 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, May 5, 2009 at 08:18, Vicky Goyal vikasrattango...@gmail.com
 wrote:

  if i need to generate an automated excel report from a webapplication,
  which shows list of bdays.

 Can you show us the html of the page and watir code you have written to deal
 with it so far?

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



[wtr-general] Re: Generate an automated excel report of birthdays today

2009-05-05 Thread Željko Filipin
On Tue, May 5, 2009 at 11:58, Vicky Goyal vikasrattango...@gmail.com
wrote:
 the same list comes in a table format.

Are you able to get names and birthdays into variable?

I would suggest that you save them in csv file. That will be significatly
less work than driving Excel, and Excel can open csv file just fine.

Let me know if you need more help.

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



[wtr-general] Re: Generate an automated excel report of birthdays today

2009-05-05 Thread Vicky Goyal


Hey Zeljko
class Sparsh_Bday Test::Unit::TestCase

   def start
   #open the IE browser
$ie = IE.new
  end


 def test_a_simplesearch


  #call start method...
  start #fires up the IE browser and a logger object

  #variables
   test_site = 'http://sparsh/V1/'
  #



  $ie.goto(test_site)
  $ie.link(:url, 'http://172.25.103.20/BCards/').click

Now here, when i have reached the main page for bdays.
how shall i take the data from this view source to csv or excel.

Can you send some sample scripts with proper syntax.

regds

On May 5, 3:02 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, May 5, 2009 at 11:58, Vicky Goyal vikasrattango...@gmail.com
 wrote:

  the same list comes in a table format.

 Are you able to get names and birthdays into variable?

 I would suggest that you save them in csv file. That will be significatly
 less work than driving Excel, and Excel can open csv file just fine.

 Let me know if you need more help.

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



[wtr-general] Re: Generate an automated excel report of birthdays today

2009-05-05 Thread Vicky Goyal

I dont have the syntax to take bday and name to take into a variable
and then store to excel sheet or csv
any sample code or script wud be really handy

On May 5, 3:18 pm, Vicky Goyal vikasrattango...@gmail.com wrote:
 Hey Zeljko
 class Sparsh_Bday Test::Unit::TestCase

    def start
    #open the IE browser
     $ie = IE.new
   end

  def test_a_simplesearch

   #call start method...
   start #fires up the IE browser and a logger object

   #variables
    test_site = 'http://sparsh/V1/'
   #

   $ie.goto(test_site)
   $ie.link(:url, 'http://172.25.103.20/BCards/').click

 Now here, when i have reached the main page for bdays.
 how shall i take the data from this view source to csv or excel.

 Can you send some sample scripts with proper syntax.

 regds

 On May 5, 3:02 pm, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:



  On Tue, May 5, 2009 at 11:58, Vicky Goyal vikasrattango...@gmail.com
  wrote:

   the same list comes in a table format.

  Are you able to get names and birthdays into variable?

  I would suggest that you save them in csv file. That will be significatly
  less work than driving Excel, and Excel can open csv file just fine.

  Let me know if you need more help.

  Željko- 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: Generate an automated excel report of birthdays today

2009-05-05 Thread Željko Filipin
On Tue, May 5, 2009 at 12:21, Vicky Goyal vikasrattango...@gmail.com
wrote:
 any sample code or script wud be really handy

Same here. :)

If you post a few lines of html that contain names and dates, I could
extract it to variable and save as csv file.

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



[wtr-general] Re: Generate an automated excel report of birthdays today

2009-05-05 Thread Vicky Goyal

tr
td align=centerinput 
type=checkbox name=include
value='abdulhakkim_m'/td
td align=centerfont size=1 
face=ArialM/font/td
td align=leftfont size=1 
face=ArialAbdul Hakkim M./
font/td
td align=leftfont size=1 
face=Arial75779/td
!Ref-No6 start 
-
td align=leftfont size=1 
face=Ariala
HREF=mailto:abdulhakkim_m?subject=Birthday Greetings from Vikas
Rattan Goyalabdulhakkim_m/a/font/td
!Ref-No6 end 
-
td align=leftfont size=1 
face=ArialIHLD/font/td
td align=leftfont size=1 
face=ArialMYSORE2STP/font/
td
/tr

tr
td align=centerinput 
type=checkbox name=include
value='Abilash_293891'/td
td align=centerfont size=1 
face=ArialM/font/td
td align=leftfont size=1 
face=ArialAbhilash A. M./
font/td
td align=leftfont size=1 
face=Arial70239/td
!Ref-No6 start 
-
td align=leftfont size=1 
face=Ariala
HREF=mailto:Abilash_293891?subject=Birthday Greetings from Vikas
Rattan GoyalAbilash_293891/a/font/td
!Ref-No6 end 
-
td align=leftfont size=1 
face=ArialPRH2/font/td
td align=leftfont size=1 
face=ArialPROGBLR15/font/
td
/tr

tr
td align=centerinput 
type=checkbox name=include
value='abhilash_bs'/td
td align=centerfont size=1 
face=ArialM/font/td
td align=leftfont size=1 
face=ArialAbhilash B. S./
font/td
td align=leftfont size=1 
face=Arial58330/td
!Ref-No6 start 
-
td align=leftfont size=1 
face=Ariala
HREF=mailto:abhilash_bs?subject=Birthday Greetings from Vikas Rattan
Goyalabhilash_bs/a/font/td
!Ref-No6 end 
-
td align=leftfont size=1 
face=ArialFNAT/font/td
td align=leftfont size=1 
face=ArialINFCITYPRK4/font/
td
/tr

tr
td align=centerinput 
type=checkbox name=include
value='abhishek_caleb'/td
td align=centerfont size=1 
face=ArialM/font/td
td align=leftfont size=1 
face=ArialAbhishek Anand Caleb
T./font/td
td align=leftfont size=1 
face=Arial82077/td
!Ref-No6 start 
-
td align=leftfont size=1 
face=Ariala
HREF=mailto:abhishek_caleb?subject=Birthday Greetings from Vikas
Rattan Goyalabhishek_caleb/a/font/td
!Ref-No6 end 
-
td align=leftfont size=1 
face=ArialCMEX/font/td
td align=leftfont size=1 
face=ArialINFCITYPRK2/font/
td
/tr

tr
td align=centerinput 
type=checkbox name=include
value='Abhishek_Bhatnagar01'/td
td align=centerfont size=1 
face=ArialM/font/td
td align=leftfont size=1 
face=ArialAbhishek Bhatnagar/
font/td
td align=leftfont size=1 
face=Arial/td
!Ref-No6 start 
-
td align=leftfont size=1 
face=Ariala
HREF=mailto:Abhishek_Bhatnagar01?subject=Birthday Greetings from
Vikas Rattan GoyalAbhishek_Bhatnagar01/a/font/td
!Ref-No6 end 
-
td align=leftfont size=1 
face=ArialPRCS/font/td
td 

[wtr-general] Re: Generate an automated excel report of birthdays today

2009-05-05 Thread Željko Filipin
On Tue, May 5, 2009 at 13:09, Vicky Goyal vikasrattango...@gmail.com
wrote:
 for ur reference sir

And what represents birthday in the html you have sent?

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