[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-08 Thread SuperKevy

Well done Satish,
Yepper we just gave you some close enuf examples.
Glad you caught on and deconstructed the code to what you needed.


On Apr 7, 3:41 pm, satish spanchumar...@gmail.com wrote:
 Thank you Tiffany and SuperKevy,

 Both solutions are wonderful. Appreciate your help on this. I had to
 make some changes to work for my schenario.
 Here is both with changes.

 # SuperKevy solution.##
 findUser=Charlotte
   myTable=ie.table(:id,
 'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable')
   iRows=myTable.row_count()          # Rows in the table
   i=1
   while i = iRows do
     user=myTable[i][1].text
     puts Row Number: #{i} : Agency Name: #{user}: 

     if user == findUser then
         myTable [i][1].document.scrollIntoView
         myTable [i][1].flash
         myTable [i][1].focus
         myTable [i][1].click
         break   # Found Break the While Loop

     end
     i=i+1
   end
 
 #Tiffany solution.#
 # OnMouse over to 'Wilmongton' string, then click on it.
 i=1
 ie.table(:id,
 'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable') 
 .rows.each
 do |row|
   if row.text.include?('Wilmington')
     row.fire_event('onmouseover')
     ie.table(:id,
 'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable')
 [i][1].click
   end
   i=i+1
 end
 =

 Thank you very much,
 Satish

 On Apr 7, 3:59 pm, Tiffany Fodor tcfo...@comcast.net wrote:



  I found this page with Google:

 http://www.autohotkey.com/docs/commands/Send.htm

  Does this work?

   ie.send_keys('{Click}')

  It really seems like there should be another event you can fire
  somewhere.  I'd navigate through the IE Dev Toolbar output at the
  table, row and cell levels looking for it.

  -Tiffany

  On Apr 7, 1:39 pm, satish spanchumar...@gmail.com wrote:

   Hi Tiffany,

   This link has just keyboard commands. Do you know mouse commands?

   Appreaciate your help.
   Thank you very much,
   Satish

   On Apr 7, 3:18 pm, Tiffany Fodor tcfo...@comcast.net wrote:

Here's the list of send key actions:

   http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

to send an Enter:
ie.send_keys('{Enter}')

I don't think it will work with Firefox, however

Does this work?
row[1].click  #clicking on column 1 of the row, pick any column you
like

-Tiffany

On Apr 7, 12:51 pm, satish spanchumar...@gmail.com wrote:

 Hi Tiffany,

 I think your solution is going to work. I have to use left click now
 to select that text, can you please tell me what is the command for
 left clicking.
 is there any reference place for all the commands availabel?

 Thank you
 Appreciate your help.
 Satish

 On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

  Ah - I just looked at your html source and it's not a span.

  Sorry for the wild guess.

  Can you get IE Dev Toolbar or Firebug output for the row or element
  you're trying to select?

  You can parse through the rows in your table like this:

  my_table = browser.table(:id, 'table id')

  my_table.rows.each do |row|
    if row.text.include?('Wilmington')
      row.fire_event('onmouseover')
    end
  end

  The row.fire_event('onmouseover') line will depend on what 
  information
  you get from IE Dev Toolbar or Firebug.  How does the user interact
  with the row?  Do they just click on it?  You might be able to send 
  a
  left click or enter with send_keys to select it.

  -Tiffany

  On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Hi Satish!

   This is just a stab in the dark, but is the text you want to 
   click a
   span rather than a link?  This has been the case for me from time 
   to
   time.  If it is the case for you, you should be able to click it 
   like
   this:

   browser.span(:text, 'my text).click

   or more specifically for a div:

   browser.div(:id, 'div id').span(:text, 'my text').click

   Hope this helps!

   -Tiffany

   On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

Thanks Chuck, I will work with our dev guys to figure it out.

Thanks
Satish

On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com 
wrote:

 There's probably some kind of javascript event being 
 triggered  You'll
 likely need to look at the source to figure out what element 
 it's
 attached to, figure out how to identify that element, and if 
 the
 element type doesn't support a click method you'll have to 
 try firing
 javascript events at it such as mouseup, or mousedown 
 (mouseup is most
 frequently used to detect clicking on something)

 On Apr 7, 5:53 am, satish 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-08 Thread satish

Thank you.

On Apr 7, 8:02 pm, KimBrown kimbro...@yahoo.com wrote:
 One other way that I figure out how to select a certain cell or button
 is to use a freeware capture/playback tool called Script Recorder.
 I'll set it to record and click on what I want and the code will
 almost always be generated (it doesn't handle java popups). Then I cut
 it and paste it into what I'm working on. You can find it 
 athttp://www.webmetrics.com/products/script_recorder.html.

 Kim

 On Apr 7, 1:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:





  Can you get IE Dev Toolbar or Firebug output for the row or element
  you're trying to select?- 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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-08 Thread satish

Thank you
Satish

On Apr 8, 10:54 am, SuperKevy kpe...@scholarshipamerica.org wrote:
 Well done Satish,
 Yepper we just gave you some close enuf examples.
 Glad you caught on and deconstructed the code to what you needed.

 On Apr 7, 3:41 pm, satish spanchumar...@gmail.com wrote:



  Thank you Tiffany and SuperKevy,

  Both solutions are wonderful. Appreciate your help on this. I had to
  make some changes to work for my schenario.
  Here is both with changes.

  # SuperKevy solution.##
  findUser=Charlotte
    myTable=ie.table(:id,
  'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable')
    iRows=myTable.row_count()          # Rows in the table
    i=1
    while i = iRows do
      user=myTable[i][1].text
      puts Row Number: #{i} : Agency Name: #{user}: 

      if user == findUser then
          myTable [i][1].document.scrollIntoView
          myTable [i][1].flash
          myTable [i][1].focus
          myTable [i][1].click
          break   # Found Break the While Loop

      end
      i=i+1
    end
  
  #Tiffany solution.#
  # OnMouse over to 'Wilmongton' string, then click on it.
  i=1
  ie.table(:id,
  'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable') 
  .rows.each
  do |row|
    if row.text.include?('Wilmington')
      row.fire_event('onmouseover')
      ie.table(:id,
  'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable')
  [i][1].click
    end
    i=i+1
  end
  =

  Thank you very much,
  Satish

  On Apr 7, 3:59 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   I found this page with Google:

  http://www.autohotkey.com/docs/commands/Send.htm

   Does this work?

    ie.send_keys('{Click}')

   It really seems like there should be another event you can fire
   somewhere.  I'd navigate through the IE Dev Toolbar output at the
   table, row and cell levels looking for it.

   -Tiffany

   On Apr 7, 1:39 pm, satish spanchumar...@gmail.com wrote:

Hi Tiffany,

This link has just keyboard commands. Do you know mouse commands?

Appreaciate your help.
Thank you very much,
Satish

On Apr 7, 3:18 pm, Tiffany Fodor tcfo...@comcast.net wrote:

 Here's the list of send key actions:

http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

 to send an Enter:
 ie.send_keys('{Enter}')

 I don't think it will work with Firefox, however

 Does this work?
 row[1].click  #clicking on column 1 of the row, pick any column you
 like

 -Tiffany

 On Apr 7, 12:51 pm, satish spanchumar...@gmail.com wrote:

  Hi Tiffany,

  I think your solution is going to work. I have to use left click now
  to select that text, can you please tell me what is the command for
  left clicking.
  is there any reference place for all the commands availabel?

  Thank you
  Appreciate your help.
  Satish

  On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Ah - I just looked at your html source and it's not a span.

   Sorry for the wild guess.

   Can you get IE Dev Toolbar or Firebug output for the row or 
   element
   you're trying to select?

   You can parse through the rows in your table like this:

   my_table = browser.table(:id, 'table id')

   my_table.rows.each do |row|
     if row.text.include?('Wilmington')
       row.fire_event('onmouseover')
     end
   end

   The row.fire_event('onmouseover') line will depend on what 
   information
   you get from IE Dev Toolbar or Firebug.  How does the user 
   interact
   with the row?  Do they just click on it?  You might be able to 
   send a
   left click or enter with send_keys to select it.

   -Tiffany

   On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

Hi Satish!

This is just a stab in the dark, but is the text you want to 
click a
span rather than a link?  This has been the case for me from 
time to
time.  If it is the case for you, you should be able to click 
it like
this:

browser.span(:text, 'my text).click

or more specifically for a div:

browser.div(:id, 'div id').span(:text, 'my text').click

Hope this helps!

-Tiffany

On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

 Thanks Chuck, I will work with our dev guys to figure it out.

 Thanks
 Satish

 On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com 
 wrote:

  There's probably some kind of javascript event being 
  triggered  You'll
  likely need to look at the source to figure out what 
  element it's
  attached to, figure out how to identify that element, and 
  if the
  element type doesn't support a click method you'll 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish

Any help on this is greatly appreciated.

Thank you
Satish

On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:
 Its actually just text not a link.

 My table  has columns 'Agency', City, State. Each row will have data
 populated. I will have to select a row based on the 'Agency' I want,
 then only the OK button will get Enabled. Once I select a 'Agency' I
 could select OK button.

 Thanks
 Satish

 On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:



  is there something more inside the cell than just the text?   because
  normally 'selecting' a table cell does nothing.  If there's something
  in there that you can act on, maybe you should try to address that
  element, using (:text, 'textyouknow) to identify it.

  If you need to be sure it's inside the table you can specify it that
  way (again just like nested tables or frames)

  e.g if it was a link, then

  browser.table(stufftoidtable).link(:text, 'textIknow').click

  by the way I do the same kind of thing with divs..  say that the same
  link about appears in both a standard footer, and a page specific
  header, both of which are defined as divs, you can do things like this
  to make sure you are looking at or working with the correct one

  browser.div(:id, 'navheader').link(:text, 'about')
  browser.div(:id, 'footer').link(:text, 'about')

  On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

   I have atableinside that I have 3X3 rows/columns.
   I need to select a cellbasedontext.

   Please tell me how to deal with this.

   HTML tag for the cell is attached under TD tag as #text
   Ex:-
   Tableid=tableid
   TR id=tablerow
   TD id=tabledataWilmington /TD
   /TR
   /Table

   Thank you very much.

   Appreciate your help.
   Satish- Hide quoted text -

  - Show quoted text -- 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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Chuck van der Linden

There's probably some kind of javascript event being triggered  You'll
likely need to look at the source to figure out what element it's
attached to, figure out how to identify that element, and if the
element type doesn't support a click method you'll have to try firing
javascript events at it such as mouseup, or mousedown (mouseup is most
frequently used to detect clicking on something)


On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:
 Any help on this is greatly appreciated.

 Thank you
 Satish

 On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:



  Its actually just text not a link.

  My table  has columns 'Agency', City, State. Each row will have data
  populated. I will have to select a row based on the 'Agency' I want,
  then only the OK button will get Enabled. Once I select a 'Agency' I
  could select OK button.

  Thanks
  Satish

  On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

   is there something more inside the cell than just the text?   because
   normally 'selecting' a table cell does nothing.  If there's something
   in there that you can act on, maybe you should try to address that
   element, using (:text, 'textyouknow) to identify it.

   If you need to be sure it's inside the table you can specify it that
   way (again just like nested tables or frames)

   e.g if it was a link, then

   browser.table(stufftoidtable).link(:text, 'textIknow').click

   by the way I do the same kind of thing with divs..  say that the same
   link about appears in both a standard footer, and a page specific
   header, both of which are defined as divs, you can do things like this
   to make sure you are looking at or working with the correct one

   browser.div(:id, 'navheader').link(:text, 'about')
   browser.div(:id, 'footer').link(:text, 'about')

   On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

I have atableinside that I have 3X3 rows/columns.
I need to select a cellbasedontext.

Please tell me how to deal with this.

HTML tag for the cell is attached under TD tag as #text
Ex:-
Tableid=tableid
TR id=tablerow
TD id=tabledataWilmington /TD
/TR
/Table

Thank you very much.

Appreciate your help.
Satish- Hide quoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -- 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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread SuperKevy

Tiffany has the method.
Here's the equivalent as a stupid dog trick

Assume a 2 column table the lookup is column 2.
Assume there is only 1 table on the page.
The action I want is an associated image click in column 1

  findUser=Wilmington
  myTable=ie.table(:index,1)
  iRows=myTable.row_count()  # Rows in the table
  i=1
  while i = iRows do
user=myTable[i][2].text
if user == findUser then
myTable [i][2].document.scrollIntoView
myTable [i][1].flash
myTable [i][1].image(:alt,'Edit').focus
myTable [i][1].image(:alt,'Edit').click
break   # Found Break the While Loop
end
i=i+1
  end



On Apr 7, 1:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Ah - I just looked at your html source and it's not a span.

 Sorry for the wild guess.

 Can you get IE Dev Toolbar or Firebug output for the row or element
 you're trying to select?

 You can parse through the rows in your table like this:

 my_table = browser.table(:id, 'table id')

 my_table.rows.each do |row|
   if row.text.include?('Wilmington')
     row.fire_event('onmouseover')
   end
 end

 The row.fire_event('onmouseover') line will depend on what information
 you get from IE Dev Toolbar or Firebug.  How does the user interact
 with the row?  Do they just click on it?  You might be able to send a
 left click or enter with send_keys to select it.

 -Tiffany

 On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:



  Hi Satish!

  This is just a stab in the dark, but is the text you want to click a
  span rather than a link?  This has been the case for me from time to
  time.  If it is the case for you, you should be able to click it like
  this:

  browser.span(:text, 'my text).click

  or more specifically for a div:

  browser.div(:id, 'div id').span(:text, 'my text').click

  Hope this helps!

  -Tiffany

  On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

   Thanks Chuck, I will work with our dev guys to figure it out.

   Thanks
   Satish

   On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

There's probably some kind of javascript event being triggered  You'll
likely need to look at the source to figure out what element it's
attached to, figure out how to identify that element, and if the
element type doesn't support a click method you'll have to try firing
javascript events at it such as mouseup, or mousedown (mouseup is most
frequently used to detect clicking on something)

On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

 Any help on this is greatly appreciated.

 Thank you
 Satish

 On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

  Its actually just text not a link.

  My table  has columns 'Agency', City, State. Each row will have data
  populated. I will have to select a row based on the 'Agency' I want,
  then only the OK button will get Enabled. Once I select a 
  'Agency' I
  could select OK button.

  Thanks
  Satish

  On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

   is there something more inside the cell than just the text?   
   because
   normally 'selecting' a table cell does nothing.  If there's 
   something
   in there that you can act on, maybe you should try to address that
   element, using (:text, 'textyouknow) to identify it.

   If you need to be sure it's inside the table you can specify it 
   that
   way (again just like nested tables or frames)

   e.g if it was a link, then

   browser.table(stufftoidtable).link(:text, 'textIknow').click

   by the way I do the same kind of thing with divs..  say that the 
   same
   link about appears in both a standard footer, and a page 
   specific
   header, both of which are defined as divs, you can do things like 
   this
   to make sure you are looking at or working with the correct one

   browser.div(:id, 'navheader').link(:text, 'about')
   browser.div(:id, 'footer').link(:text, 'about')

   On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

I have atableinside that I have 3X3 rows/columns.
I need to select a cellbasedontext.

Please tell me how to deal with this.

HTML tag for the cell is attached under TD tag as #text
Ex:-
Tableid=tableid
TR id=tablerow
TD id=tabledataWilmington /TD
/TR
/Table

Thank you very much.

Appreciate your help.
Satish- Hide quoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -- Hide quoted text -

- Show quoted text -- 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 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor

Hi Satish!

This is just a stab in the dark, but is the text you want to click a
span rather than a link?  This has been the case for me from time to
time.  If it is the case for you, you should be able to click it like
this:

browser.span(:text, 'my text).click

or more specifically for a div:

browser.div(:id, 'div id').span(:text, 'my text').click

Hope this helps!

-Tiffany

On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:
 Thanks Chuck, I will work with our dev guys to figure it out.

 Thanks
 Satish

 On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

  There's probably some kind of javascript event being triggered  You'll
  likely need to look at the source to figure out what element it's
  attached to, figure out how to identify that element, and if the
  element type doesn't support a click method you'll have to try firing
  javascript events at it such as mouseup, or mousedown (mouseup is most
  frequently used to detect clicking on something)

  On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

   Any help on this is greatly appreciated.

   Thank you
   Satish

   On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

Its actually just text not a link.

My table  has columns 'Agency', City, State. Each row will have data
populated. I will have to select a row based on the 'Agency' I want,
then only the OK button will get Enabled. Once I select a 'Agency' I
could select OK button.

Thanks
Satish

On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

 is there something more inside the cell than just the text?   because
 normally 'selecting' a table cell does nothing.  If there's something
 in there that you can act on, maybe you should try to address that
 element, using (:text, 'textyouknow) to identify it.

 If you need to be sure it's inside the table you can specify it that
 way (again just like nested tables or frames)

 e.g if it was a link, then

 browser.table(stufftoidtable).link(:text, 'textIknow').click

 by the way I do the same kind of thing with divs..  say that the same
 link about appears in both a standard footer, and a page specific
 header, both of which are defined as divs, you can do things like this
 to make sure you are looking at or working with the correct one

 browser.div(:id, 'navheader').link(:text, 'about')
 browser.div(:id, 'footer').link(:text, 'about')

 On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

  I have atableinside that I have 3X3 rows/columns.
  I need to select a cellbasedontext.

  Please tell me how to deal with this.

  HTML tag for the cell is attached under TD tag as #text
  Ex:-
  Tableid=tableid
  TR id=tablerow
  TD id=tabledataWilmington /TD
  /TR
  /Table

  Thank you very much.

  Appreciate your help.
  Satish- Hide quoted text -

 - Show quoted text -- Hide quoted text -

- Show quoted text -- Hide quoted text -

   - Show quoted text -- 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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish

Hi SuperKevy,

I do not have image tags or any tags that I can call, I am struck
right there with your code.
I am dealing with pure text.

Is there any solution for my case?
Tiffany solution seems to be working, but that code have mouseover
only. Do you know whats the command for left click? is it MouseUp?
some thing like that?

Appreaciate your help.
Thank you very much,
Satish


On Apr 7, 2:48 pm, SuperKevy kpe...@scholarshipamerica.org wrote:
 Tiffany has the method.
 Here's the equivalent as a stupid dog trick

 Assume a 2 column table the lookup is column 2.
 Assume there is only 1 table on the page.
 The action I want is an associated image click in column 1

   findUser=Wilmington
   myTable=ie.table(:index,1)
   iRows=myTable.row_count()          # Rows in the table
   i=1
   while i = iRows do
     user=myTable[i][2].text
     if user == findUser then
         myTable [i][2].document.scrollIntoView
         myTable [i][1].flash
         myTable [i][1].image(:alt,'Edit').focus
         myTable [i][1].image(:alt,'Edit').click
         break   # Found Break the While Loop
     end
     i=i+1
   end

 On Apr 7, 1:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:



  Ah - I just looked at your html source and it's not a span.

  Sorry for the wild guess.

  Can you get IE Dev Toolbar or Firebug output for the row or element
  you're trying to select?

  You can parse through the rows in your table like this:

  my_table = browser.table(:id, 'table id')

  my_table.rows.each do |row|
    if row.text.include?('Wilmington')
      row.fire_event('onmouseover')
    end
  end

  The row.fire_event('onmouseover') line will depend on what information
  you get from IE Dev Toolbar or Firebug.  How does the user interact
  with the row?  Do they just click on it?  You might be able to send a
  left click or enter with send_keys to select it.

  -Tiffany

  On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Hi Satish!

   This is just a stab in the dark, but is the text you want to click a
   span rather than a link?  This has been the case for me from time to
   time.  If it is the case for you, you should be able to click it like
   this:

   browser.span(:text, 'my text).click

   or more specifically for a div:

   browser.div(:id, 'div id').span(:text, 'my text').click

   Hope this helps!

   -Tiffany

   On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

Thanks Chuck, I will work with our dev guys to figure it out.

Thanks
Satish

On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

 There's probably some kind of javascript event being triggered  You'll
 likely need to look at the source to figure out what element it's
 attached to, figure out how to identify that element, and if the
 element type doesn't support a click method you'll have to try firing
 javascript events at it such as mouseup, or mousedown (mouseup is most
 frequently used to detect clicking on something)

 On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

  Any help on this is greatly appreciated.

  Thank you
  Satish

  On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

   Its actually just text not a link.

   My table  has columns 'Agency', City, State. Each row will have 
   data
   populated. I will have to select a row based on the 'Agency' I 
   want,
   then only the OK button will get Enabled. Once I select a 
   'Agency' I
   could select OK button.

   Thanks
   Satish

   On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

is there something more inside the cell than just the text?   
because
normally 'selecting' a table cell does nothing.  If there's 
something
in there that you can act on, maybe you should try to address 
that
element, using (:text, 'textyouknow) to identify it.

If you need to be sure it's inside the table you can specify it 
that
way (again just like nested tables or frames)

e.g if it was a link, then

browser.table(stufftoidtable).link(:text, 'textIknow').click

by the way I do the same kind of thing with divs..  say that 
the same
link about appears in both a standard footer, and a page 
specific
header, both of which are defined as divs, you can do things 
like this
to make sure you are looking at or working with the correct one

browser.div(:id, 'navheader').link(:text, 'about')
browser.div(:id, 'footer').link(:text, 'about')

On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

 I have atableinside that I have 3X3 rows/columns.
 I need to select a cellbasedontext.

 Please tell me how to deal with this.

 HTML tag for the cell is attached under TD tag as #text
 Ex:-
 Tableid=tableid
 TR id=tablerow
   

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish

Hi Tiffany,

This link has just keyboard commands. Do you know mouse commands?

Appreaciate your help.
Thank you very much,
Satish

On Apr 7, 3:18 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Here's the list of send key actions:

 http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

 to send an Enter:
 ie.send_keys('{Enter}')

 I don't think it will work with Firefox, however

 Does this work?
 row[1].click  #clicking on column 1 of the row, pick any column you
 like

 -Tiffany

 On Apr 7, 12:51 pm, satish spanchumar...@gmail.com wrote:



  Hi Tiffany,

  I think your solution is going to work. I have to use left click now
  to select that text, can you please tell me what is the command for
  left clicking.
  is there any reference place for all the commands availabel?

  Thank you
  Appreciate your help.
  Satish

  On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Ah - I just looked at your html source and it's not a span.

   Sorry for the wild guess.

   Can you get IE Dev Toolbar or Firebug output for the row or element
   you're trying to select?

   You can parse through the rows in your table like this:

   my_table = browser.table(:id, 'table id')

   my_table.rows.each do |row|
     if row.text.include?('Wilmington')
       row.fire_event('onmouseover')
     end
   end

   The row.fire_event('onmouseover') line will depend on what information
   you get from IE Dev Toolbar or Firebug.  How does the user interact
   with the row?  Do they just click on it?  You might be able to send a
   left click or enter with send_keys to select it.

   -Tiffany

   On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

Hi Satish!

This is just a stab in the dark, but is the text you want to click a
span rather than a link?  This has been the case for me from time to
time.  If it is the case for you, you should be able to click it like
this:

browser.span(:text, 'my text).click

or more specifically for a div:

browser.div(:id, 'div id').span(:text, 'my text').click

Hope this helps!

-Tiffany

On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

 Thanks Chuck, I will work with our dev guys to figure it out.

 Thanks
 Satish

 On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

  There's probably some kind of javascript event being triggered  
  You'll
  likely need to look at the source to figure out what element it's
  attached to, figure out how to identify that element, and if the
  element type doesn't support a click method you'll have to try 
  firing
  javascript events at it such as mouseup, or mousedown (mouseup is 
  most
  frequently used to detect clicking on something)

  On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

   Any help on this is greatly appreciated.

   Thank you
   Satish

   On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

Its actually just text not a link.

My table  has columns 'Agency', City, State. Each row will have 
data
populated. I will have to select a row based on the 'Agency' I 
want,
then only the OK button will get Enabled. Once I select a 
'Agency' I
could select OK button.

Thanks
Satish

On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com 
wrote:

 is there something more inside the cell than just the text?   
 because
 normally 'selecting' a table cell does nothing.  If there's 
 something
 in there that you can act on, maybe you should try to address 
 that
 element, using (:text, 'textyouknow) to identify it.

 If you need to be sure it's inside the table you can specify 
 it that
 way (again just like nested tables or frames)

 e.g if it was a link, then

 browser.table(stufftoidtable).link(:text, 'textIknow').click

 by the way I do the same kind of thing with divs..  say that 
 the same
 link about appears in both a standard footer, and a page 
 specific
 header, both of which are defined as divs, you can do things 
 like this
 to make sure you are looking at or working with the correct 
 one

 browser.div(:id, 'navheader').link(:text, 'about')
 browser.div(:id, 'footer').link(:text, 'about')

 On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

  I have atableinside that I have 3X3 rows/columns.
  I need to select a cellbasedontext.

  Please tell me how to deal with this.

  HTML tag for the cell is attached under TD tag as #text
  Ex:-
  Tableid=tableid
  TR id=tablerow
  TD id=tabledataWilmington /TD
  /TR
  /Table

  Thank you very much.

  Appreciate your help.
  Satish- Hide 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor

I found this page with Google:

http://www.autohotkey.com/docs/commands/Send.htm

Does this work?

 ie.send_keys('{Click}')

It really seems like there should be another event you can fire
somewhere.  I'd navigate through the IE Dev Toolbar output at the
table, row and cell levels looking for it.

-Tiffany

On Apr 7, 1:39 pm, satish spanchumar...@gmail.com wrote:
 Hi Tiffany,

 This link has just keyboard commands. Do you know mouse commands?

 Appreaciate your help.
 Thank you very much,
 Satish

 On Apr 7, 3:18 pm, Tiffany Fodor tcfo...@comcast.net wrote:

  Here's the list of send key actions:

 http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

  to send an Enter:
  ie.send_keys('{Enter}')

  I don't think it will work with Firefox, however

  Does this work?
  row[1].click  #clicking on column 1 of the row, pick any column you
  like

  -Tiffany

  On Apr 7, 12:51 pm, satish spanchumar...@gmail.com wrote:

   Hi Tiffany,

   I think your solution is going to work. I have to use left click now
   to select that text, can you please tell me what is the command for
   left clicking.
   is there any reference place for all the commands availabel?

   Thank you
   Appreciate your help.
   Satish

   On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

Ah - I just looked at your html source and it's not a span.

Sorry for the wild guess.

Can you get IE Dev Toolbar or Firebug output for the row or element
you're trying to select?

You can parse through the rows in your table like this:

my_table = browser.table(:id, 'table id')

my_table.rows.each do |row|
  if row.text.include?('Wilmington')
    row.fire_event('onmouseover')
  end
end

The row.fire_event('onmouseover') line will depend on what information
you get from IE Dev Toolbar or Firebug.  How does the user interact
with the row?  Do they just click on it?  You might be able to send a
left click or enter with send_keys to select it.

-Tiffany

On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

 Hi Satish!

 This is just a stab in the dark, but is the text you want to click a
 span rather than a link?  This has been the case for me from time to
 time.  If it is the case for you, you should be able to click it like
 this:

 browser.span(:text, 'my text).click

 or more specifically for a div:

 browser.div(:id, 'div id').span(:text, 'my text').click

 Hope this helps!

 -Tiffany

 On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

  Thanks Chuck, I will work with our dev guys to figure it out.

  Thanks
  Satish

  On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

   There's probably some kind of javascript event being triggered  
   You'll
   likely need to look at the source to figure out what element it's
   attached to, figure out how to identify that element, and if the
   element type doesn't support a click method you'll have to try 
   firing
   javascript events at it such as mouseup, or mousedown (mouseup is 
   most
   frequently used to detect clicking on something)

   On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

Any help on this is greatly appreciated.

Thank you
Satish

On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

 Its actually just text not a link.

 My table  has columns 'Agency', City, State. Each row will 
 have data
 populated. I will have to select a row based on the 'Agency' 
 I want,
 then only the OK button will get Enabled. Once I select a 
 'Agency' I
 could select OK button.

 Thanks
 Satish

 On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com 
 wrote:

  is there something more inside the cell than just the text? 
    because
  normally 'selecting' a table cell does nothing.  If there's 
  something
  in there that you can act on, maybe you should try to 
  address that
  element, using (:text, 'textyouknow) to identify it.

  If you need to be sure it's inside the table you can 
  specify it that
  way (again just like nested tables or frames)

  e.g if it was a link, then

  browser.table(stufftoidtable).link(:text, 
  'textIknow').click

  by the way I do the same kind of thing with divs..  say 
  that the same
  link about appears in both a standard footer, and a page 
  specific
  header, both of which are defined as divs, you can do 
  things like this
  to make sure you are looking at or working with the correct 
  one

  browser.div(:id, 'navheader').link(:text, 'about')
  browser.div(:id, 'footer').link(:text, 'about')

  On Apr 6, 3:27 pm, satish 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor

Ah - I just looked at your html source and it's not a span.

Sorry for the wild guess.

Can you get IE Dev Toolbar or Firebug output for the row or element
you're trying to select?

You can parse through the rows in your table like this:

my_table = browser.table(:id, 'table id')

my_table.rows.each do |row|
  if row.text.include?('Wilmington')
row.fire_event('onmouseover')
  end
end


The row.fire_event('onmouseover') line will depend on what information
you get from IE Dev Toolbar or Firebug.  How does the user interact
with the row?  Do they just click on it?  You might be able to send a
left click or enter with send_keys to select it.

-Tiffany



On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Hi Satish!

 This is just a stab in the dark, but is the text you want to click a
 span rather than a link?  This has been the case for me from time to
 time.  If it is the case for you, you should be able to click it like
 this:

 browser.span(:text, 'my text).click

 or more specifically for a div:

 browser.div(:id, 'div id').span(:text, 'my text').click

 Hope this helps!

 -Tiffany

 On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

  Thanks Chuck, I will work with our dev guys to figure it out.

  Thanks
  Satish

  On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

   There's probably some kind of javascript event being triggered  You'll
   likely need to look at the source to figure out what element it's
   attached to, figure out how to identify that element, and if the
   element type doesn't support a click method you'll have to try firing
   javascript events at it such as mouseup, or mousedown (mouseup is most
   frequently used to detect clicking on something)

   On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

Any help on this is greatly appreciated.

Thank you
Satish

On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

 Its actually just text not a link.

 My table  has columns 'Agency', City, State. Each row will have data
 populated. I will have to select a row based on the 'Agency' I want,
 then only the OK button will get Enabled. Once I select a 'Agency' I
 could select OK button.

 Thanks
 Satish

 On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

  is there something more inside the cell than just the text?   
  because
  normally 'selecting' a table cell does nothing.  If there's 
  something
  in there that you can act on, maybe you should try to address that
  element, using (:text, 'textyouknow) to identify it.

  If you need to be sure it's inside the table you can specify it that
  way (again just like nested tables or frames)

  e.g if it was a link, then

  browser.table(stufftoidtable).link(:text, 'textIknow').click

  by the way I do the same kind of thing with divs..  say that the 
  same
  link about appears in both a standard footer, and a page specific
  header, both of which are defined as divs, you can do things like 
  this
  to make sure you are looking at or working with the correct one

  browser.div(:id, 'navheader').link(:text, 'about')
  browser.div(:id, 'footer').link(:text, 'about')

  On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

   I have atableinside that I have 3X3 rows/columns.
   I need to select a cellbasedontext.

   Please tell me how to deal with this.

   HTML tag for the cell is attached under TD tag as #text
   Ex:-
   Tableid=tableid
   TR id=tablerow
   TD id=tabledataWilmington /TD
   /TR
   /Table

   Thank you very much.

   Appreciate your help.
   Satish- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -- Hide quoted text -

- Show quoted text -- 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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor

Here's the list of send key actions:

http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

to send an Enter:
ie.send_keys('{Enter}')

I don't think it will work with Firefox, however

Does this work?
row[1].click  #clicking on column 1 of the row, pick any column you
like

-Tiffany


On Apr 7, 12:51 pm, satish spanchumar...@gmail.com wrote:
 Hi Tiffany,

 I think your solution is going to work. I have to use left click now
 to select that text, can you please tell me what is the command for
 left clicking.
 is there any reference place for all the commands availabel?

 Thank you
 Appreciate your help.
 Satish

 On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

  Ah - I just looked at your html source and it's not a span.

  Sorry for the wild guess.

  Can you get IE Dev Toolbar or Firebug output for the row or element
  you're trying to select?

  You can parse through the rows in your table like this:

  my_table = browser.table(:id, 'table id')

  my_table.rows.each do |row|
    if row.text.include?('Wilmington')
      row.fire_event('onmouseover')
    end
  end

  The row.fire_event('onmouseover') line will depend on what information
  you get from IE Dev Toolbar or Firebug.  How does the user interact
  with the row?  Do they just click on it?  You might be able to send a
  left click or enter with send_keys to select it.

  -Tiffany

  On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Hi Satish!

   This is just a stab in the dark, but is the text you want to click a
   span rather than a link?  This has been the case for me from time to
   time.  If it is the case for you, you should be able to click it like
   this:

   browser.span(:text, 'my text).click

   or more specifically for a div:

   browser.div(:id, 'div id').span(:text, 'my text').click

   Hope this helps!

   -Tiffany

   On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

Thanks Chuck, I will work with our dev guys to figure it out.

Thanks
Satish

On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

 There's probably some kind of javascript event being triggered  You'll
 likely need to look at the source to figure out what element it's
 attached to, figure out how to identify that element, and if the
 element type doesn't support a click method you'll have to try firing
 javascript events at it such as mouseup, or mousedown (mouseup is most
 frequently used to detect clicking on something)

 On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

  Any help on this is greatly appreciated.

  Thank you
  Satish

  On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

   Its actually just text not a link.

   My table  has columns 'Agency', City, State. Each row will have 
   data
   populated. I will have to select a row based on the 'Agency' I 
   want,
   then only the OK button will get Enabled. Once I select a 
   'Agency' I
   could select OK button.

   Thanks
   Satish

   On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

is there something more inside the cell than just the text?   
because
normally 'selecting' a table cell does nothing.  If there's 
something
in there that you can act on, maybe you should try to address 
that
element, using (:text, 'textyouknow) to identify it.

If you need to be sure it's inside the table you can specify it 
that
way (again just like nested tables or frames)

e.g if it was a link, then

browser.table(stufftoidtable).link(:text, 'textIknow').click

by the way I do the same kind of thing with divs..  say that 
the same
link about appears in both a standard footer, and a page 
specific
header, both of which are defined as divs, you can do things 
like this
to make sure you are looking at or working with the correct one

browser.div(:id, 'navheader').link(:text, 'about')
browser.div(:id, 'footer').link(:text, 'about')

On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

 I have atableinside that I have 3X3 rows/columns.
 I need to select a cellbasedontext.

 Please tell me how to deal with this.

 HTML tag for the cell is attached under TD tag as #text
 Ex:-
 Tableid=tableid
 TR id=tablerow
 TD id=tabledataWilmington /TD
 /TR
 /Table

 Thank you very much.

 Appreciate your help.
 Satish- Hide quoted text -

- Show quoted text -- Hide quoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish

Hi Tiffany,

I think your solution is going to work. I have to use left click now
to select that text, can you please tell me what is the command for
left clicking.
is there any reference place for all the commands availabel?

Thank you
Appreciate your help.
Satish

On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Ah - I just looked at your html source and it's not a span.

 Sorry for the wild guess.

 Can you get IE Dev Toolbar or Firebug output for the row or element
 you're trying to select?

 You can parse through the rows in your table like this:

 my_table = browser.table(:id, 'table id')

 my_table.rows.each do |row|
   if row.text.include?('Wilmington')
     row.fire_event('onmouseover')
   end
 end

 The row.fire_event('onmouseover') line will depend on what information
 you get from IE Dev Toolbar or Firebug.  How does the user interact
 with the row?  Do they just click on it?  You might be able to send a
 left click or enter with send_keys to select it.

 -Tiffany

 On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:



  Hi Satish!

  This is just a stab in the dark, but is the text you want to click a
  span rather than a link?  This has been the case for me from time to
  time.  If it is the case for you, you should be able to click it like
  this:

  browser.span(:text, 'my text).click

  or more specifically for a div:

  browser.div(:id, 'div id').span(:text, 'my text').click

  Hope this helps!

  -Tiffany

  On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

   Thanks Chuck, I will work with our dev guys to figure it out.

   Thanks
   Satish

   On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

There's probably some kind of javascript event being triggered  You'll
likely need to look at the source to figure out what element it's
attached to, figure out how to identify that element, and if the
element type doesn't support a click method you'll have to try firing
javascript events at it such as mouseup, or mousedown (mouseup is most
frequently used to detect clicking on something)

On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

 Any help on this is greatly appreciated.

 Thank you
 Satish

 On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

  Its actually just text not a link.

  My table  has columns 'Agency', City, State. Each row will have data
  populated. I will have to select a row based on the 'Agency' I want,
  then only the OK button will get Enabled. Once I select a 
  'Agency' I
  could select OK button.

  Thanks
  Satish

  On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

   is there something more inside the cell than just the text?   
   because
   normally 'selecting' a table cell does nothing.  If there's 
   something
   in there that you can act on, maybe you should try to address that
   element, using (:text, 'textyouknow) to identify it.

   If you need to be sure it's inside the table you can specify it 
   that
   way (again just like nested tables or frames)

   e.g if it was a link, then

   browser.table(stufftoidtable).link(:text, 'textIknow').click

   by the way I do the same kind of thing with divs..  say that the 
   same
   link about appears in both a standard footer, and a page 
   specific
   header, both of which are defined as divs, you can do things like 
   this
   to make sure you are looking at or working with the correct one

   browser.div(:id, 'navheader').link(:text, 'about')
   browser.div(:id, 'footer').link(:text, 'about')

   On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

I have atableinside that I have 3X3 rows/columns.
I need to select a cellbasedontext.

Please tell me how to deal with this.

HTML tag for the cell is attached under TD tag as #text
Ex:-
Tableid=tableid
TR id=tablerow
TD id=tabledataWilmington /TD
/TR
/Table

Thank you very much.

Appreciate your help.
Satish- Hide quoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -- Hide quoted text -

- Show quoted text -- 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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish

Thank you Tiffany and SuperKevy,

Both solutions are wonderful. Appreciate your help on this. I had to
make some changes to work for my schenario.
Here is both with changes.

# SuperKevy solution.##
findUser=Charlotte
  myTable=ie.table(:id,
'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable')
  iRows=myTable.row_count()  # Rows in the table
  i=1
  while i = iRows do
user=myTable[i][1].text
puts Row Number: #{i} : Agency Name: #{user}: 

if user == findUser then
myTable [i][1].document.scrollIntoView
myTable [i][1].flash
myTable [i][1].focus
myTable [i][1].click
break   # Found Break the While Loop

end
i=i+1
  end

#Tiffany solution.#
# OnMouse over to 'Wilmongton' string, then click on it.
i=1
ie.table(:id,
'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable') .rows.each
do |row|
  if row.text.include?('Wilmington')
row.fire_event('onmouseover')
ie.table(:id,
'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable')
[i][1].click
  end
  i=i+1
end
=

Thank you very much,
Satish

On Apr 7, 3:59 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 I found this page with Google:

 http://www.autohotkey.com/docs/commands/Send.htm

 Does this work?

  ie.send_keys('{Click}')

 It really seems like there should be another event you can fire
 somewhere.  I'd navigate through the IE Dev Toolbar output at the
 table, row and cell levels looking for it.

 -Tiffany

 On Apr 7, 1:39 pm, satish spanchumar...@gmail.com wrote:



  Hi Tiffany,

  This link has just keyboard commands. Do you know mouse commands?

  Appreaciate your help.
  Thank you very much,
  Satish

  On Apr 7, 3:18 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Here's the list of send key actions:

  http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

   to send an Enter:
   ie.send_keys('{Enter}')

   I don't think it will work with Firefox, however

   Does this work?
   row[1].click  #clicking on column 1 of the row, pick any column you
   like

   -Tiffany

   On Apr 7, 12:51 pm, satish spanchumar...@gmail.com wrote:

Hi Tiffany,

I think your solution is going to work. I have to use left click now
to select that text, can you please tell me what is the command for
left clicking.
is there any reference place for all the commands availabel?

Thank you
Appreciate your help.
Satish

On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

 Ah - I just looked at your html source and it's not a span.

 Sorry for the wild guess.

 Can you get IE Dev Toolbar or Firebug output for the row or element
 you're trying to select?

 You can parse through the rows in your table like this:

 my_table = browser.table(:id, 'table id')

 my_table.rows.each do |row|
   if row.text.include?('Wilmington')
     row.fire_event('onmouseover')
   end
 end

 The row.fire_event('onmouseover') line will depend on what information
 you get from IE Dev Toolbar or Firebug.  How does the user interact
 with the row?  Do they just click on it?  You might be able to send a
 left click or enter with send_keys to select it.

 -Tiffany

 On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

  Hi Satish!

  This is just a stab in the dark, but is the text you want to click a
  span rather than a link?  This has been the case for me from time to
  time.  If it is the case for you, you should be able to click it 
  like
  this:

  browser.span(:text, 'my text).click

  or more specifically for a div:

  browser.div(:id, 'div id').span(:text, 'my text').click

  Hope this helps!

  -Tiffany

  On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

   Thanks Chuck, I will work with our dev guys to figure it out.

   Thanks
   Satish

   On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

There's probably some kind of javascript event being triggered  
You'll
likely need to look at the source to figure out what element 
it's
attached to, figure out how to identify that element, and if the
element type doesn't support a click method you'll have to try 
firing
javascript events at it such as mouseup, or mousedown (mouseup 
is most
frequently used to detect clicking on something)

On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

 Any help on this is greatly appreciated.

 Thank you
 Satish

 On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

  Its actually just text not a link.

  My table  has columns 'Agency', City, State. Each row will 
  have data
  populated. I will have to select a row based 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread KimBrown

One other way that I figure out how to select a certain cell or button
is to use a freeware capture/playback tool called Script Recorder.
I'll set it to record and click on what I want and the code will
almost always be generated (it doesn't handle java popups). Then I cut
it and paste it into what I'm working on. You can find it at
http://www.webmetrics.com/products/script_recorder.html.

Kim


On Apr 7, 1:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

 Can you get IE Dev Toolbar or Firebug output for the row or element
 you're trying to select?


--~--~-~--~~~---~--~~
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 click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-06 Thread satish

Its actually just text not a link.

My table  has columns 'Agency', City, State. Each row will have data
populated. I will have to select a row based on the 'Agency' I want,
then only the OK button will get Enabled. Once I select a 'Agency' I
could select OK button.

Thanks
Satish

On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:
 is there something more inside the cell than just the text?   because
 normally 'selecting' a table cell does nothing.  If there's something
 in there that you can act on, maybe you should try to address that
 element, using (:text, 'textyouknow) to identify it.

 If you need to be sure it's inside the table you can specify it that
 way (again just like nested tables or frames)

 e.g if it was a link, then

 browser.table(stufftoidtable).link(:text, 'textIknow').click

 by the way I do the same kind of thing with divs..  say that the same
 link about appears in both a standard footer, and a page specific
 header, both of which are defined as divs, you can do things like this
 to make sure you are looking at or working with the correct one

 browser.div(:id, 'navheader').link(:text, 'about')
 browser.div(:id, 'footer').link(:text, 'about')

 On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:



  I have atableinside that I have 3X3 rows/columns.
  I need to select a cellbasedontext.

  Please tell me how to deal with this.

  HTML tag for the cell is attached under TD tag as #text
  Ex:-
  Tableid=tableid
  TR id=tablerow
  TD id=tabledataWilmington /TD
  /TR
  /Table

  Thank you very much.

  Appreciate your help.
  Satish- 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
-~--~~~~--~~--~--~---