Implement a patch to get HtmlUnit to work on Google AppEngine
$15-20 USD
Closed
Posted almost 13 years ago
$15-20 USD
Paid on delivery
I installed Groovy Web Console onto google AppEngine. The application can be found here:
<[login to view URL]>
I now need to be able to use HtmlUnit on GAE but there are several restrictions, as described in the link below. The link below provides a patch that solves these problems. The task is to implement this patch so that that Html Unit can be run in a groovy script on GAE. Here is the thread:
<[login to view URL]>
If you are accepted for this job I'll send you the full sources and a Google Account to upload the application onto AppEngine under these credentials.
Continued below...
## Deliverables
I installed Groovy Web Console onto google AppEngine. The application can be found here:
<[login to view URL]>
I now need to be able to use HtmlUnit on GAE but there are several restrictions, as described in the link below. The link below provides a patch that solves these problems. The task is to implement this patch so that that Html Unit can be run in a groovy script on GAE. Here is the thread:
<[login to view URL]>
If you are accepted for this job I'll send you the full sources and a Google Account to upload the application onto AppEngine under these credentials.
To test this, paste the below script in above Web Console and see if it runs. Currently, it returns the following error:
[login to view URL]$CallNotFoundException: The API package 'urlfetch' or call 'Fetch()' was not found.
at [login to view URL]([login to view URL])
at [login to view URL]([login to view URL])
at [login to view URL]([login to view URL])
at [login to view URL]([login to view URL])
at [login to view URL]([login to view URL])
at [login to view URL]([login to view URL])
The Script (paste it into the Groovy web console above to see what result you currently get):
import [login to view URL];
import [login to view URL];
import [login to view URL];
import [login to view URL];
import [login to view URL];
final WebClient webClient = new WebClient();
URL url = new URL("[login to view URL]");
WebRequest webRequest = new WebRequest(url);
final HtmlPage page = [login to view URL](webRequest);
println("HtmlUnit - Welcome to HtmlUnit"+ [login to view URL]());
final String pageAsXml = [login to view URL]();
println("contains body class composite: "+[login to view URL]("<body class=\"composite\">"));
final String pageAsText = [login to view URL]();
println("Support for the HTTP and HTTPS protocols: "+[login to view URL]("Support for the HTTP and HTTPS protocols"));
[login to view URL]();