Thanks a lot Joe....it worked

On Wednesday, June 26, 2013, Joe Fleck wrote:

> hi,
>
> you could do this
>
> Original:
> @browser.a(:href=>"delete.page**?#{link_href_arr[link_href_**arr.count -
> 1]}").click
>
> Modified:
> @browser.a(:href=>"delete.page**?d#{link_href_arr[link_href_**arr.count -
> 1]}").click
>
> I added a 'd' in the href element.
>
> Your other options are to the developers make the href the same for edit
> and delete.  The other options is to use index.  Can be a lot of work.  Try
> the modified line above.
>
> Joe
>
>
>
> On Wed, Jun 26, 2013 at 12:01 PM, watir webdriver <
> [email protected] <javascript:_e({}, 'cvml',
> '[email protected]');>> wrote:
>
>> 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>
>>
>> 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] <javascript:_e({},
>> 'cvml', 'watir-general%[email protected]');>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> [email protected] <javascript:_e({}, 'cvml',
> '[email protected]');>
> http://groups.google.com/group/watir-general
> [email protected] <javascript:_e({}, 'cvml',
> 'watir-general%[email protected]');>
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Watir General" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/watir-general/5lWYgBrTkSo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected] <javascript:_e({}, 'cvml',
> 'watir-general%[email protected]');>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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


Reply via email to