[Webtest] Post a request without content

Philippe Schoch webtest@lists.canoo.com
Tue, 18 Apr 2006 15:59:22 +0200


This is a cryptographically signed message in MIME format.

--------------ms070501060501000908060700
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I have the problem to address a lot of anonymous links in a (jsf-)page 
that execute some javascript-code (at 'onClick').
To address via XPath is not suitable and prone to fail on changes made 
to the page.
One try was to execute the js-code directly from webtest with 
'scriptStep'. Aside the problem I encountered (see email 'scriptStep: 
JavaScriptEngine not found') the js-code is not run in the scope of the 
page (what I was afraid of. But I thought I can get over that when my 
Classloader-problem has been solved).
So another try was to set the hidden field via 
'emulateSetHiddenInputField' and to submit the form. That's what the 
onClick-js-code is doing.
To submit the form I only see the solution with <invoke method="POST">. 
But I have to add a contentfile which content seems to be very complex. 
Or can I enforce a submit()?
Does somebody have another idea or is Webtest not made to deal 
efficiently with such a problem?

Thanks for help,

Philippe

--------------ms070501060501000908060700
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJWTCC
AwcwggJwoAMCAQICEDGh5KvKbKlle3oHEKH/EI0wDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UE
BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMT
I1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDMwNzA5MDEwN1oX
DTA3MDMwNzA5MDEwN1owZzEPMA0GA1UEBBMGU2Nob2NoMREwDwYDVQQqEwhQaGlsaXBwZTEY
MBYGA1UEAxMPUGhpbGlwcGUgU2Nob2NoMScwJQYJKoZIhvcNAQkBFhhwaGlsaXBwZS5zY2hv
Y2hAZXJ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