I can't get a cookie I have "set" at the start of a TC using <header> to stay 
around. I know I can't persist a cookie across multiple tests with WebTest, but 
I thought I could persist one within a single TC this way. 
 
For example, I have a site that will display a different page to a user 
dependent upon a cookie value. There is a default view, then explicitly set 
other views. This set with a script when the site is browsed to, and every page 
check that cookie to determine what the user sees. The "easy" way to make sure 
I am looking at the right page is through a verifyTitle. For this example, 
assume the possible titles are "Yes" and "No". Any help? Is this a bug?
 
So I want to do something like this: 
<config haltonfailure="false">
        <header name="Cookie" value="bob=yes">        </header> 
</config>

<invoke url="somepage1"></invoke>
<!-- The following will PASS -->
<verifyTitle text="Yes"> </verifyTitle>

<!-- I tried the following scenarios individually -->
<clickLink label="some label"> </clickLink>
<!-- The following will FAIL -->
<verifyTitle text="Yes"></verifyTitle>

<invoke url="sonofsomepage1"></invoke>
<!-- This would also FAIL -->
<verifyTitle text="Yes"></verifyTitle>

<invoke url="somepage1"></invoke>

<!-- Even re-invoking the first page will FAIL -->

<verifyTitle text="Yes"> </verifyTitle>



      

Reply via email to