[ptt-users] Redirects

Dan Scarf dan at docmagic.com
Mon Apr 9 09:44:48 PDT 2007


Hi,

I'm working with a test case that uses useragentbase.py. It's a test
case I generated by capturing from a Web browser via the 'record'
wizard.

 

I've since stripped out the initial stuff in runTest (I just visited
google.com, simply to get the structure of the test generated). I then
added my own code in the runTest section.

 

I'm initializing the test like so:

 

test = CreateUserTestCase( 3, 'console file xml ', 1,
'20.|300|301|302|303|304|307|401|403|408|41.', 'log.xml', 0, 0, 0, 1, 1,
'CreateUserTestCase', 1 )

 

I'm running into an issue whereby to get to the redirected url I have to
do this:

 

        self.post(
'''http://'''+self.hostName+'''/servlet/NewCustomer''', self.params)

        

        self.redirectUrl = re.sub("https", "http",
self.response.getParameterValue("Location"))

        self.post(self.redirectUrl)

 

The code doesn't seem to respect the setting to follow redirects.

 

Any help would be appreciated.

 

Thanks,

-Dan


CONFIDENTIALITY NOTICE: This email and any attachments thereto may contain information which is privileged and confidential, and is intended for the sole use of the recipient(s) named above. Any use whatsoever of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is strictly prohibited. If you have received this email in error, please notify the sender either by telephone, by email, or by any other written or telephonic means, and delete the material from any computer. Thank you for your cooperation.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cake.pushtotest.com/pipermail/users/attachments/20070409/c408aa01/attachment-0001.htm


More information about the Users mailing list