Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Clear Cookie

rvmseng
rvmseng Posts: 89
edited December 2018 in SOAtest

Dear Support Team,

I want to know how can I clear (delete) all cookies in SOATest 9.10 in web scenario,
unfortunately I can't access to document.

please refer to following image.

Comments

  • rvmseng
    rvmseng Posts: 89

    Dear Support,

    please assist me.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    Dear Support,

    You may get a response from someone on the forum community. However, if you would like to get a timely answer from Parasoft Support team then please click here.

  • jakubiak
    jakubiak Posts: 795 admin

    The "Execute JavaScript" action is run verbatim within the browser. So the code doesn't need to be defined in the same way as you would for Extension Tools or other scripts within SOAtest. So you should just be able to reference the document object directly. Your script would turn into something like the following:

    deleteCookie(element) { 
        document.cookie = "COOKIE_NAME=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; 
    }
    

    See the section "Execute JavaScript" within the following SOAtest docs page: https://docs.parasoft.com/display/SOA9106/Modifying+User+Actions+Simulated+by+a+Web+Scenario+1

  • rvmseng
    rvmseng Posts: 89

    Thank you.