Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7734491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:15:47+00:00 2026-06-01T07:15:47+00:00

Here’s my code package net.sourceforge.jwebunit.sample; import net.sourceforge.jwebunit.WebTestCase; public class JWebUnitSearchExample extends WebTestCase { public

  • 0

Here’s my code

package net.sourceforge.jwebunit.sample;

import net.sourceforge.jwebunit.WebTestCase;


public class JWebUnitSearchExample extends WebTestCase {

    public JWebUnitSearchExample(String name) {
        super(name);
    }

    public void setUp() {
        getTestContext().setBaseUrl("http://www.google.com");
        getTestContext().setProxyName("some.proxyname.com.au");
        getTestContext().setProxyPort(8080);
    }

    public void testSearch() {
        beginAt("/");
        setFormElement("q", "httpunit");
        submit("btnG");
        clickLinkWithText("HttpUnit");
        assertTitleEquals("HttpUnit");
        assertLinkPresentWithText("User's Manual");
    }
}

When running it I got the following Syntax Error:

SyntaxError: syntax error (httpunit; line 155)
    at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
    at org.mozilla.javascript.TokenStream.reportSyntaxError(TokenStream.java:1324)
    at org.mozilla.javascript.Parser.reportError(Parser.java:73)
    at org.mozilla.javascript.Parser.primaryExpr(Parser.java:1411)
    at org.mozilla.javascript.Parser.memberExpr(Parser.java:1201)
    at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1115)
    at org.mozilla.javascript.Parser.mulExpr(Parser.java:1062)
    at org.mozilla.javascript.Parser.addExpr(Parser.java:1045)
    at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1032)
    at org.mozilla.javascript.Parser.relExpr(Parser.java:1015)
    at org.mozilla.javascript.Parser.eqExpr(Parser.java:1002)
    at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:991)
    at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:980)
    at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:969)
    at org.mozilla.javascript.Parser.andExpr(Parser.java:957)
    at org.mozilla.javascript.Parser.orExpr(Parser.java:945)
    at org.mozilla.javascript.Parser.condExpr(Parser.java:928)
    at org.mozilla.javascript.Parser.assignExpr(Parser.java:909)
    at org.mozilla.javascript.Parser.expr(Parser.java:898)
    at org.mozilla.javascript.Parser.statementHelper(Parser.java:791)
    at org.mozilla.javascript.Parser.statement(Parser.java:387)
    at org.mozilla.javascript.Parser.parseFunctionBody(Parser.java:167)
    at org.mozilla.javascript.Parser.function(Parser.java:271)
    at org.mozilla.javascript.Parser.parseFunctionBody(Parser.java:165)
    at org.mozilla.javascript.Parser.function(Parser.java:271)
    at org.mozilla.javascript.Parser.primaryExpr(Parser.java:1265)
    at org.mozilla.javascript.Parser.memberExpr(Parser.java:1201)
    at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1115)
    at org.mozilla.javascript.Parser.mulExpr(Parser.java:1062)
    at org.mozilla.javascript.Parser.addExpr(Parser.java:1045)
    at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1032)
    at org.mozilla.javascript.Parser.relExpr(Parser.java:1015)
    at org.mozilla.javascript.Parser.eqExpr(Parser.java:1002)
    at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:991)
    at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:980)
    at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:969)
    at org.mozilla.javascript.Parser.andExpr(Parser.java:957)
    at org.mozilla.javascript.Parser.orExpr(Parser.java:945)
    at org.mozilla.javascript.Parser.condExpr(Parser.java:928)
    at org.mozilla.javascript.Parser.assignExpr(Parser.java:909)
    at org.mozilla.javascript.Parser.argumentList(Parser.java:1152)
    at org.mozilla.javascript.Parser.memberExprTail(Parser.java:1240)
    at org.mozilla.javascript.Parser.memberExpr(Parser.java:1204)
    at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1115)
    at org.mozilla.javascript.Parser.mulExpr(Parser.java:1062)
    at org.mozilla.javascript.Parser.addExpr(Parser.java:1045)
    at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1032)
    at org.mozilla.javascript.Parser.relExpr(Parser.java:1015)
    at org.mozilla.javascript.Parser.eqExpr(Parser.java:1002)
    at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:991)
    at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:980)
    at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:969)
    at org.mozilla.javascript.Parser.andExpr(Parser.java:957)
    at org.mozilla.javascript.Parser.orExpr(Parser.java:945)
    at org.mozilla.javascript.Parser.condExpr(Parser.java:928)
    at org.mozilla.javascript.Parser.assignExpr(Parser.java:909)
    at org.mozilla.javascript.Parser.expr(Parser.java:898)
    at org.mozilla.javascript.Parser.statementHelper(Parser.java:791)
    at org.mozilla.javascript.Parser.statement(Parser.java:387)
    at org.mozilla.javascript.Parser.parseFunctionBody(Parser.java:167)
    at org.mozilla.javascript.Parser.function(Parser.java:271)
    at org.mozilla.javascript.Parser.primaryExpr(Parser.java:1265)
    at org.mozilla.javascript.Parser.memberExpr(Parser.java:1201)
    at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1115)
    at org.mozilla.javascript.Parser.mulExpr(Parser.java:1062)
    at org.mozilla.javascript.Parser.addExpr(Parser.java:1045)
    at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1032)
    at org.mozilla.javascript.Parser.relExpr(Parser.java:1015)
    at org.mozilla.javascript.Parser.eqExpr(Parser.java:1002)
    at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:991)
    at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:980)
    at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:969)
    at org.mozilla.javascript.Parser.andExpr(Parser.java:957)
    at org.mozilla.javascript.Parser.orExpr(Parser.java:945)
    at org.mozilla.javascript.Parser.condExpr(Parser.java:928)
    at org.mozilla.javascript.Parser.assignExpr(Parser.java:909)
    at org.mozilla.javascript.Parser.expr(Parser.java:898)
    at org.mozilla.javascript.Parser.primaryExpr(Parser.java:1368)
    at org.mozilla.javascript.Parser.memberExpr(Parser.java:1201)
    at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1115)
    at org.mozilla.javascript.Parser.mulExpr(Parser.java:1062)
    at org.mozilla.javascript.Parser.addExpr(Parser.java:1045)
    at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1032)
    at org.mozilla.javascript.Parser.relExpr(Parser.java:1015)
    at org.mozilla.javascript.Parser.eqExpr(Parser.java:1002)
    at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:991)
    at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:980)
    at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:969)
    at org.mozilla.javascript.Parser.andExpr(Parser.java:957)
    at org.mozilla.javascript.Parser.orExpr(Parser.java:945)
    at org.mozilla.javascript.Parser.condExpr(Parser.java:928)
    at org.mozilla.javascript.Parser.assignExpr(Parser.java:909)
    at org.mozilla.javascript.Parser.expr(Parser.java:898)
    at org.mozilla.javascript.Parser.statementHelper(Parser.java:791)
    at org.mozilla.javascript.Parser.statement(Parser.java:387)
    at org.mozilla.javascript.Parser.parse(Parser.java:128)
    at org.mozilla.javascript.Context.compile(Context.java:2053)
    at org.mozilla.javascript.Context.compile(Context.java:2006)
    at org.mozilla.javascript.Context.compileReader(Context.java:899)
    at org.mozilla.javascript.Context.evaluateReader(Context.java:817)
    at org.mozilla.javascript.Context.evaluateString(Context.java:784)
    at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.executeScript(JavaScript.java:122)
    at com.meterware.httpunit.scripting.ScriptableDelegate.runScript(ScriptableDelegate.java:64)
    at com.meterware.httpunit.parsing.ScriptFilter.getTranslatedScript(ScriptFilter.java:150)
    at com.meterware.httpunit.parsing.ScriptFilter.endElement(ScriptFilter.java:131)
    at org.cyberneko.html.HTMLTagBalancer.callEndElement(Unknown Source)
    at org.cyberneko.html.HTMLTagBalancer.endElement(Unknown Source)
    at org.cyberneko.html.HTMLScanner$SpecialScanner.scan(Unknown Source)
    at org.cyberneko.html.HTMLScanner.scanDocument(Unknown Source)
    at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
    at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at com.meterware.httpunit.parsing.NekoHTMLParser.parse(NekoHTMLParser.java:41)
    at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:244)
    at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:1014)
    at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:611)
    at com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaScript.java:424)
    at com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80)
    at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(JavaScriptEngineFactory.java:46)
    at com.meterware.httpunit.RequestContext.runScripts(RequestContext.java:44)
    at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:119)
    at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:107)
    at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:245)
    at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:224)
    at com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:75)
    at com.meterware.httpunit.SubmitButton.doButtonAction(SubmitButton.java:47)
    at com.meterware.httpunit.Button.click(Button.java:68)
    at net.sourceforge.jwebunit.HttpUnitDialog.submit(HttpUnitDialog.java:557)
    at net.sourceforge.jwebunit.WebTester.submit(WebTester.java:868)
    at net.sourceforge.jwebunit.WebTestCase.submit(WebTestCase.java:351)
    at net.sourceforge.jwebunit.sample.JWebUnitSearchExample.testSearch(JWebUnitSearchExample.java:32)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:15:48+00:00Added an answer on June 1, 2026 at 7:15 am

    I think you need to import

    import net.sourceforge.jwebunit.junit.*;
    

    And NOT

    import net.sourceforge.jwebunit.WebTestCase;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my code sample, let me know if it can be further improved?
Here is my code, which takes two version identifiers in the form 1, 5,
Here is an example: I write html code inside of textarea, then I swap
Here's my Manifest: <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android package=com.mappp.mobile android:versionCode=1 android:versionName=1.0 > <supports-screens android:largeScreens=true
Here is a scenario: User installs .NET application that you have made. After some
Here's a sample of a SpinBox that writes its changes to underlying variables. The
Here is my code...I have two dimensional matrices A,B. I want to develop the
Here an example of my checkbox list http://jsfiddle.net/YnM2f/ Let's say I check on G
Here is my code (Say we have a single button on the page that
Here is what I am trying to achieve in PHP: I have this string:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.