yes, ive stumbled across that page before, but there is not alot of documentation there on how to use jwebunit. So then your back resorting to the 2.x doc.
-Endre -----Opprinnelig melding----- Fra: [EMAIL PROTECTED] på vegne av Julien HENRY Sendt: on 06.02.2008 09:31 Til: Usage problems for JWebUnit Emne: [JWebUnit-users] Re : Re : proxy in TestContext Hi, 2.x site is outdated. Take a look at http://jwebunit.sourceforge.net/changes-report.html Regards, Julien ----- Message d'origine ---- De : Moen Endre <[EMAIL PROTECTED]> À : Usage problems for JWebUnit <[email protected]>; Usage problems for JWebUnit <[email protected]> Envoyé le : Mercredi, 6 Février 2008, 9h18mn 19s Objet : Re: [JWebUnit-users] Re : proxy in TestContext SV: [JWebUnit-users] Re : proxy in TestContext Thanx that worked fine. Just needed to include another dependency to jwebunit-core. Could not find much documentation on the new release on the jwebunit homepage http://jwebunit.sourceforge.net/2.x/index.html -Endre -----Opprinnelig melding----- Fra: [EMAIL PROTECTED] på vegne av Julien HENRY Sendt: ti 05.02.2008 16:04 Til: Usage problems for JWebUnit Emne: [JWebUnit-users] Re : proxy in TestContext Hi, You should try to update to 1.4.1. Regards, Julien ----- Message d'origine ---- De : Moen Endre <[EMAIL PROTECTED]> À : [email protected] Envoyé le : Mardi, 5 Février 2008, 10h12mn 55s Objet : [JWebUnit-users] proxy in TestContext proxy in TestContext Hi, I have a test like this (the point is the proxy settings): public class GoogleBrowseTest extends WebTestCase { public void setUp() { setTestingEngineKey( TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT ); getTestContext().setBaseUrl( "http://www.google.com" ); TestContext ctx = this.getTestContext(); ctx.setProxyPort( 88 ); ctx.setProxyName( "proxy" ); } public void testSearch() throws Exception { beginAt( "/" ); setTextField( "q", "htmlunit" ); submit( "btnG" ); } } but the proxy settings in net.sourceforge.jwebunit.TestContext is never applied and I dont get a connection to google. In net.sourceforge.jwebunit.htmlunit.HtmlUnitDialog.beginAt(String initialURL, TestContext context) you call initWebClient() and here you create a com.gargoylesoftware.htmlunit.WebClient (from the htmlUnit project) with wc = new WebClient(new BrowserVersion(BrowserVersion.INTERNET_EXPLORER, "4.0", testContext.getUserAgent(), "1.2", 6)); but to apply the proxy settings from TestContext you should call the other WebClient constructor like this: wc = new WebClient(new BrowserVersion(BrowserVersion.INTERNET_EXPLORER, "4.0", testContext.getUserAgent(), "1.2", 6), testContext.getProxyName, testContext.getProxyPort); Please let me know if I am wrong or have misunderstood. By the way I am not comfortable with the alternative approach when building with maven of setting the proxy settings inside the System class like described here: http://www.it-eye.nl/weblog/2005/07/07/jwebunit-untrusted-certificates-https-and-proxies/ This is the version of jwebunit im using: <dependency> <groupId>net.sourceforge.jwebunit</groupId> <artifactId>jwebunit-htmlunit-plugin</artifactId> <version>1.3</version> <scope>test</scope> </dependency> -Endre -----La pièce jointe correspondante suit----- ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ -----La pièce jointe correspondante suit----- _______________________________________________ JWebUnit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr -----La pièce jointe correspondante suit----- ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ -----La pièce jointe correspondante suit----- _______________________________________________ JWebUnit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr
<<winmail.dat>>
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ JWebUnit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
