Skip to Content

Exit button not working in WDA

Hi ,

I know this has been asked multiple times, i found many thread on it but none solved my problem.

I need a logout button which cleans up user's session in my application, so that when the user logs in next time, the user is forced to enter the credentials again(login screen).

Current state of applicaiton:

  • I have created an exit plug , which is triggered when clicking a href button in my application. This works fine as it comes out of the applicaiton into a blank screen.
  • In the applicaiton node(SICF), i have included the java script code.

<html><body><script language="javascript"> function DelSso2Cookie(sName,sPath) {var sso2Domain = location.hostname;if (location.hostname.indexOf(".")>

0)sso2Domain =location.hostname.substr(location.hostname.indexOf(".")+ 1);p="";if(sPath)p=" path="+sPath+";";document.cookie = sName+"=0; expires=Fri, 31 Dec 1999 23:59:59GMT;"+p + "domain="+sso2Domain+";";}

</script><span style="font-weight:bold;vertical-align:middle"> <br>

You are logged off successfully

<br></span>

<script language="javascript">

try {document.execCommand( 'ClearAuthenticationCache' );} catch (e) {} DelSso2Cookie("MYSAPSSO2","/");

</script>
<body onload = "DelSso2Cookie("MYSAPSSO2","/")">
</body></html>

The application logs in automatically when i relaunch the application (user not prompted with login screen).

Thanks & regards,

AD

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.