How to test remember me functionality

3,911 views
Skip to first unread message

Er. Debasish Dutta

unread,
Mar 27, 2015, 6:19:35 AM3/27/15
to seleniu...@googlegroups.com
 Hi All,

i have a scenario where i need to test the remember me check box functionality.

First i need to open the browser and enter credential then check the remember me check box and close the browser.
So next if i will open the url then login page should not display as i had checked remember me check box it should open the home page. 

How i can deal with this??


Please help.

--

Thanks & Regards,

Debasish Dutta

Bhanu Prasad Sangita

unread,
Mar 30, 2015, 12:49:14 AM3/30/15
to seleniu...@googlegroups.com
Hi,

Delete or clear the browser cookies for every run in the test case i.e  " driver.manage().deleteAllCookies(); " there are many other options in cookie management through selenium...this may help you.

Thank You,
S Bhanu.

The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify ATMECS and delete it from your computer.

Xiang Dong

unread,
Mar 30, 2015, 10:01:52 AM3/30/15
to seleniu...@googlegroups.com
Not sure how your application implement remember me. But every time when you start a browser via web driver, it could be considered as totally clean browser. It means it does not have any history data. It will cause remember me function not work as expect.


From: er....@gmail.com
Date: Fri, 27 Mar 2015 15:48:35 +0530
Subject: [selenium-users] How to test remember me functionality
To: seleniu...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAHLX%3D%2B-avpf_C9FHP%3Dp1jyvFK9Zn7bbNMQsfWb_FYZiW4rQEKg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

David

unread,
Mar 30, 2015, 3:16:58 PM3/30/15
to seleniu...@googlegroups.com
One option is to open a new (blank) window, maybe with javascript. Close current window and switch to newly opened window to resume testing the remember me functionality. If you close browser session (by closing the one and only window) then you may have problems when starting next browser session to resume testing the remember me functionality.

Testing the functionality may vary depending on the browser used. If Firefox (and Chrome), you get clean sessions each time, so you would have to save the remember me cookie to file/disk before closing browser session then when open new session, manually add/create back the cookie in browser session by fetching it from file/disk using Selenium API to add the cookie (but you'd probably have to do this at the target site/domain and then do page refresh after adding cookie to continue).

If testing on browsers like IE and Safari, unless things have changed, the cookie session may still be in cache. I believe these browsers don't specifically give you a clean session by default unless you request it during driver startup from the DesiredCapabilities.

ranjit nayak

unread,
Feb 8, 2017, 7:42:25 AM2/8/17
to Selenium Users
Someone please clarify, in Security testing, should we allow .js files in attachments?

Thanks.
Reply all
Reply to author
Forward
0 new messages