[Jwebunit-development] jWebUnit/fitplugin/src/net/sourceforge/jwebunit/fit WebFixture.java,1.22,1.23
Brought to you by:
henryju
From: Björn B. <bb...@us...> - 2005-05-15 20:16:26
|
Update of /cvsroot/jwebunit/jWebUnit/fitplugin/src/net/sourceforge/jwebunit/fit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26308/fitplugin/src/net/sourceforge/jwebunit/fit Modified Files: WebFixture.java Log Message: Added exceptionsThrownOnScriptError, button and linkWithImage actions. Index: WebFixture.java =================================================================== RCS file: /cvsroot/jwebunit/jWebUnit/fitplugin/src/net/sourceforge/jwebunit/fit/WebFixture.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** WebFixture.java 19 Nov 2004 16:08:43 -0000 1.22 --- WebFixture.java 15 May 2005 20:16:16 -0000 1.23 *************** *** 52,56 **** --- 52,64 ---- } + public void setExceptionsThrownOnScriptError(boolean flag) { + com.meterware.httpunit.HttpUnitOptions.setExceptionsThrownOnScriptError(flag); + } + // Actions + public void exceptionsThrownOnScriptError() { + setExceptionsThrownOnScriptError("true".equalsIgnoreCase(cells.more.text())); + } + public void baseUrl() { setBaseUrl(cells.more.text()); *************** *** 128,131 **** --- 136,151 ---- } + public void button() { + try { + tester.clickButton(cells.more.more.text()); + } catch (Throwable t) { + if (t instanceof AssertionFailedError) { + markLastArgumentWrong(cells.more.more, 1, t.getMessage()); + } else { + exception(cells.last(), t); + } + } + } + public void link() { try { *************** *** 140,143 **** --- 160,175 ---- } + public void linkWithImage() { + try { + tester.clickLinkWithImage(cells.more.more.text()); + } catch (Throwable t) { + if (t instanceof AssertionFailedError) { + markLastArgumentWrong(cells.more.more, 1, t.getMessage()); + } else { + exception(cells.last(), t); + } + } + } + public void linkId() { tester.clickLink(cells.more.more.text()); |