[cl-selenium-devel] Re: Returned values not handled correctly
Chaitanya Gupta
mail at chaitanyagupta.com
Sun May 18 14:39:24 UTC 2008
Chaitanya Gupta wrote:
> 1. Return types aren't really taken care of. e.g. DO-GET-ALL-FIELDS
> should return a list (or an array) of strings, as is returned by
> getAllFields (from the Selenium API); however, it returns only one
> string. iedoc.xml specifies the return types of all the functions.
> 2. DO-GET-HTML-SOURCE fails to return the complete source if the page
> source contains any commas. This is because EXECUTE splits the the
> HTTP response on the comma (using split-sequence), and returns only
> the second value of this list.
>
> Is there any patch on the way for these bugs? If not, I'll be happy to
> contribute.
>
I have attached a patch file (output of csv diff) which fixes these
problems. In a nutshell, the changes I have made are:
* The class IEDOC-FUNCTION now has an additional slot, RETURN-TYPE. Its
value is based on the return type specified for a function in iedoc.xml.
EXECUTE has also been modified to take an optional argument,
RETURN-TYPE, in addition to the required argument URL. This converts the
response appropriately before returning it. e.g. if the RETURN-TYPE is
LIST (corresponding to "string[]" return type in iedoc.xml), the result
is a list of strings.
* EXECUTE no longer splits the entire HTTP reply on a comma -- this
prevents the second bug described above.
I hope the patch is good enough. If there are any issues with it, I'll
gladly fix them.
Chaitanya
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: selenium.patch
URL: <https://mailman.common-lisp.net/pipermail/cl-selenium-devel/attachments/20080518/fcb6b376/attachment.ksh>
More information about the cl-selenium-devel
mailing list