Re: using jWebUnit with webObjects
Re: using jWebUnit with webObjects
- Subject: Re: using jWebUnit with webObjects
- From: Kaj Hejer <email@hidden>
- Date: Thu, 6 May 2004 08:29:16 +0200
At 18:43 -0500 05-05-04, John Spicer wrote:
I have downloaded this package after someone on this list pointed me to
it. Looks good.
But I'm having trouble moving around between pages. WebObjects is using
the funny URL strings so it's not like a normal site, where clicking on
a link, you'll know where you will be taken.
For example, the example code shown does things like this:
public void testAnotherPage()
{
beginAt("/");
assertTitleEquals("My Name");
assertLinkPresentWithText("whatever");
etc...
I'm thrown by the beginAt("/"); since I don't really know where this
page will start from.
Hi!
You need to set setBaseUrl. If running on osx you also need to set
setEncodingScheme.
We are using something like the following:
public void setUp() throws Exception {
super.setUp();
getTestContext().setBaseUrl(
"http://localhost:8080/cgi-bin/WebObjects/myapp.woa");
getTestContext().setEncodingScheme("MacRoman");
}
In my tests I then use
beginAt("");
-Kaj :)
_______________________________________________
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.