HI Joe,
Still its not working....the href for the deletion is <a href="
delete.page?did=83">
but the code which I've is looking for :href=>"delete.page?id=83"
Is there any way to to get the *:href=>"delete.page?did=83"*
Error :
unable to locate element, using {:href=>"delete.page?id=83",
:tag_name=>"a"} (Watir::Exception::UnknownObjectException)
Thanks in-advance.
On Wednesday, June 26, 2013 12:10:44 PM UTC+1, watir webdriver wrote:
>
> Hi,
>
> In my application I've a table with 40 rows.How do I delete some specific
> <td> named as "default","tags","city","organic" in that table? All the
> deletes links are images with the same *
> src **name*.Plz find the attachment of the table row.
>
> My step def:
> Then(/^I click on all the delete rules on the setup page$/) do
> words = ["default", "tags","organic","city"]
> @current_page.delete_rules(:words => words)
> end
>
> In my ruby class I've added delete_rules method as below :
> def delete_rules(words)
> image_elements(:src => "/tracker/images/skin2/bin.png").click
> end
> Problem here is its deleting the first row in the table..not the rows
> which I've mentioned in the array.
>
> My HTML is :
> <tr>
> <td>
> <a href="edit.page?id=83">tags</a>
> </td>
> <td>
> <a href="delete.page?did=83">
> *<img title="Delete" src="/tracker/images/skin2/bin.png">*
> </a>
> <a href="edit.page?id=83">
> <a href="activate.page?id=83">
> </td>
> <td> </td>
> <tr>
> <td>
> <a href="edit.page?id=83">default</a>
> </td>
> <td>
> <a href="delete.page?did=83">
> *<img title="Delete" src="/tracker/images/skin2/bin.png">*
> </a>
> <a href="edit.page?id=83">
> <a href="activate.page?id=83">
> </td>
> <td> </td>
> <tr>
> <td>
> <a href="edit.page?id=83">organic</a>
> </td>
> <td>
> <a href="delete.page?did=83">
> *<img title="Delete" src="/tracker/images/skin2/bin.png">*
> </a>
> <a href="edit.page?id=83">
> <a href="activate.page?id=83">
> </td>
> <td> </td>
> <tr>
> <td>
> <a href="edit.page?id=83">city</a>
> </td>
> <td>
> <a href="delete.page?did=83">
> *<img title="Delete" src="/tracker/images/skin2/bin.png">*
> </a>
> <a href="edit.page?id=83">
> <a href="activate.page?id=83">
> </td>
> <td> </td>
>
> Your help is much more appreciated.
>
> Thanks in advance.
>
>
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.