Thanks Les,

I've modified the app that now shows the session state in home page footer... and now I can use it to test properly.

cheers

Cristiano

On 08/02/12 14:50, Les Hazlewood wrote:
You can use whatever mechanism you want (e.g. create a JSP tag, or in
a scriptlet) to call:

SecurityUtils.getSubject().getSession(false)

http://shiro.apache.org/static/current/apidocs/org/apache/shiro/subject/Subject.html#getSession(boolean)

Regards,

Les

On Wed, Feb 8, 2012 at 2:44 AM, Cristiano Gavião<[email protected]>  wrote:
Hi,

I'm developing a integration test for my application using selenium2 +
webdriver.

At code I test if the user is authenticated using: subject.isAuthenticated()
when the home page is called. If he is not, then he is forwarded for the
login page.

I would like to simulate such situation. So anyone knows if there is a way
to know (from a browser perspective) if there is or not a shiro session ?

thanks

Cristiano

Reply via email to