I cannot figure out a way to interact with the highlighted HTML:

When I click on a link, an interactive modal appears, which has a table to allow user to buy parts. Also, the modal has links that open up new sections within the modal.
I have tried to write step definitions but cannot get test to pass. See below for my (latest attempt) code:
When /^I click on the Buy icon of loan part selected$/ do
@browser.div(:id, 'modal_loan_parts_table').link(:text, 'Buy').click
end
The error I keep getting is element not located. Can someone please direct me to enlightenment?
Here is the error that occured:
unable to locate element, using {:id=>"modal_loan_parts_table", :tag_name=>"div"} (Watir::Exception::UnknownObjectException)
./step_definitions/secondarymkt_buying_lp.rb:62:in `/^I click on the Buy icon of loan part selected$/'
secondarymkt_buying_lp.feature:27:in `When I cllick on the Buy icon of loan part selected'
Many Thanks Guys!
I found the solution without using xpath. Here is my code and it works:
Many thanks to everyone.