Clear Cookie

rvmsengrvmseng Posts: 79
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

  • rvmsengrvmseng Posts: 79

    Dear Support,

    please assist me.

  • benken_parasoftbenken_parasoft Posts: 671 ✭✭✭

    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.

  • jakubiakjakubiak Posts: 505 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

  • rvmsengrvmseng Posts: 79

    Thank you.

Sign In or Register to comment.