• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: jWebUnit - picking a link from a list in a wo repetition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jWebUnit - picking a link from a list in a wo repetition


  • Subject: Re: jWebUnit - picking a link from a list in a wo repetition
  • From: Colin Clark <email@hidden>
  • Date: Fri, 7 May 2004 11:07:01 -0400

Hi John,

You have two options to do this using JWebUnit and WebObjects.

First, if the text of the link varies for each item in the repetition, you can just use clickLinkWithText(String text).

Secondly, if the text is the same for each item--as seems to be the case for you--you'll have to assign each of your links an id attribute in WOBuilder. At that point, you can use clickLink(String linkID) to activate the link.

You'll have to come up with a strategy for assigning unique IDs to each link in the repetition. There are several ways to do this. One simple, though a bit ugly, option might be to write a method on your component class like this:

getIDForEditLinkItem() {
	return "editLink" + list.indexOfObject(currentItem);
}

I hope that helps,

Colin

On Friday, May 7, 2004, at 10:12 AM, John Spicer wrote:

I have a wo repetition with a list of names. Each row has a link (edit).

How do I specify which link I want to click?

I have gone through the jWebUnit docs but have not seen a way to select a table row and then a link within it.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.



---
Colin Clark
Dynamic Web/Database Developer
Resource Centre for Academic Technology,
University of Toronto
(416) 946-7592 / email@hidden
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >jWebUnit - picking a link from a list in a wo repetition (From: John Spicer <email@hidden>)

  • Prev by Date: XCode Again..
  • Next by Date: Re: jWebUnit (more)
  • Previous by thread: jWebUnit - picking a link from a list in a wo repetition
  • Next by thread: Re: jWebUnit - picking a link from a list in a wo repetition
  • Index(es):
    • Date
    • Thread