[wtr-general] Re: Script to click the dynamically generated link.

2009-07-29 Thread Chuck van der Linden

On Jul 28, 10:06 pm, Swapnal swapnal.sa...@gmail.com wrote:
 Hi,

 In this application when we add user every user will have the 'Edit' and
 'Delete' link.

 span class=savedentityanbsp;-nbsp;associate/span/td

                                                  tr bgcolor=#f6f2f6
                                                  td width=33%

                                                  span class=toolBara

 href=AppControl?pg=List Usersret=Editid_user=1Edit/a|
                                                  a

 href='javascript:confirmDelete(AppControl?pg=List

  Usersret=Deleteid_user=1)'Delete/a/span

 I want to write the code to click the 'Edit' link from above code.

 How can I write it?


based on just the code fragent above?

   browser.link(:text, 'Edit').click

if that doesn't answer your question, and given the thread I expect it
won't, then please go back and answer EACH of the questions I asked in
my prior post.  Most importantly, how do you as a user know which
'edit' link you want to click?and if your answer is 'for the user
I just created' or something along those lines, then understand that
my response will then be something like 'how do you know when using
the application manually, which is the edit link for the user you just
created.  Remember, in the code sample you gave, those of us who don't
know your application, have NO IDEA which text that would be displayed
represents a username..
--~--~-~--~~~---~--~~
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: Script to click the dynamically generated link.

2009-07-28 Thread Chuck van der Linden

When interacting with the page manually, how do you know which link
you want to click?  is it always in the same position (e.g. always the
third 'edit' link) or next to a particular label in the table, or
something else?

without knowing how you determind which is the correct link to click,
we can't tell you how you would create a script to do the same
thing.

Also what part of the code is 'dynamically generated' and subject to
change?  do the URL values vary?  the position on the page?  without
knowing what is dynamic vs what is constant, we can't know what
potential means to identify elements are 'out of play'  (or vastly
more complicated) as it were.

On Jul 28, 2:04 am, Swap swapnal.sa...@gmail.com wrote:
 Hello All,
 I want to write the script to click the dynamiclly generated 'Edit'
 and 'Delete' link. How can I do that?

 This is the html code for that::

 div class=contentHolder
                         table width=100% cellspacing=8 cellpadding=5 
 border=0

                                                 tr bgcolor=#f6f2f6
                                                 td width=33%

                                                 span class=toolBara 
 href=AppControl?pg=List
 Usersret=Editid_user=4Edit/a|
                                                 a 
 href='javascript:confirmDelete(AppControl?pg=List
 Usersret=Deleteid_user=4)'Delete/a/span

                                                 span 
 class=savedentityanbsp;-nbsp;associate/span/td

                                                 tr bgcolor=#f6f2f6
                                                 td width=33%

                                                 span class=toolBara 
 href=AppControl?pg=List
 Usersret=Editid_user=1Edit/a|
                                                 a 
 href='javascript:confirmDelete(AppControl?pg=List
 Usersret=Deleteid_user=1)'Delete/a/span

                                                 span 
 class=savedentityadminnbsp;-nbsp;admin/span/td

                                                 tr bgcolor=#f6f2f6
                                                 td width=33%

                                                 span class=toolBara 
 href=AppControl?pg=List
 Usersret=Editid_user=3Edit/a|
                                                 a 
 href='javascript:confirmDelete(AppControl?pg=List
 Usersret=Deleteid_user=3)'Delete/a/span

                                                 span 
 class=savedentitysappunbsp;-nbsp;associate/span/
 td

                                                 tr bgcolor=#f6f2f6
                                                 td width=33%

                                                 span class=toolBara 
 href=AppControl?pg=List
 Usersret=Editid_user=2Edit/a|
                                                 a 
 href='javascript:confirmDelete(AppControl?pg=List
 Usersret=Deleteid_user=2)'Delete/a/span

                                                 span 
 class=savedentityswapnbsp;-nbsp;associate/span/td

              /table

                         /div

 Thanks in advance

 Swapnal S.
--~--~-~--~~~---~--~~
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: Script to click the dynamically generated link.

2009-07-28 Thread Swapnal
Hi,

In this application when we add user every user will have the 'Edit' and
'Delete' link.

span class=savedentityanbsp;-nbsp;associate/span/td

 tr bgcolor=#f6f2f6
 td width=33%

 span class=toolBara
href=AppControl?pg=List
 Usersret=Editid_user=1Edit/a|
 a
href='javascript:confirmDelete(AppControl?pg=List
 Usersret=Deleteid_user=1)'Delete/a/span

I want to write the code to click the 'Edit' link from above code.

How can I write it?


On Tue, Jul 28, 2009 at 9:54 PM, Chuck van der Linden sqa...@gmail.comwrote:


 When interacting with the page manually, how do you know which link
 you want to click?  is it always in the same position (e.g. always the
 third 'edit' link) or next to a particular label in the table, or
 something else?

 without knowing how you determind which is the correct link to click,
 we can't tell you how you would create a script to do the same
 thing.

 Also what part of the code is 'dynamically generated' and subject to
 change?  do the URL values vary?  the position on the page?  without
 knowing what is dynamic vs what is constant, we can't know what
 potential means to identify elements are 'out of play'  (or vastly
 more complicated) as it were.

 On Jul 28, 2:04 am, Swap swapnal.sa...@gmail.com wrote:
  Hello All,
  I want to write the script to click the dynamiclly generated 'Edit'
  and 'Delete' link. How can I do that?
 
  This is the html code for that::
 
  div class=contentHolder
  table width=100% cellspacing=8
 cellpadding=5 border=0
 
  tr bgcolor=#f6f2f6
  td width=33%
 
  span class=toolBara
 href=AppControl?pg=List
  Usersret=Editid_user=4Edit/a|
  a
 href='javascript:confirmDelete(AppControl?pg=List
  Usersret=Deleteid_user=4)'Delete/a/span
 
  span
 class=savedentityanbsp;-nbsp;associate/span/td
 
  tr bgcolor=#f6f2f6
  td width=33%
 
  span class=toolBara
 href=AppControl?pg=List
  Usersret=Editid_user=1Edit/a|
  a
 href='javascript:confirmDelete(AppControl?pg=List
  Usersret=Deleteid_user=1)'Delete/a/span
 
  span
 class=savedentityadminnbsp;-nbsp;admin/span/td
 
  tr bgcolor=#f6f2f6
  td width=33%
 
  span class=toolBara
 href=AppControl?pg=List
  Usersret=Editid_user=3Edit/a|
  a
 href='javascript:confirmDelete(AppControl?pg=List
  Usersret=Deleteid_user=3)'Delete/a/span
 
  span
 class=savedentitysappunbsp;-nbsp;associate/span/
  td
 
  tr bgcolor=#f6f2f6
  td width=33%
 
  span class=toolBara
 href=AppControl?pg=List
  Usersret=Editid_user=2Edit/a|
  a
 href='javascript:confirmDelete(AppControl?pg=List
  Usersret=Deleteid_user=2)'Delete/a/span
 
  span
 class=savedentityswapnbsp;-nbsp;associate/span/td
 
   /table
 
  /div
 
  Thanks in advance
 
  Swapnal S.
 


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