New Tab or browser window that keeps the same session

8 posts, 1 answers
  1. Maria
    Maria avatar
    15 posts
    Member since:
    Oct 2011

    Posted 08 Dec 2015 Link to this post

    Hello

     Is it possible for a new tab or a new browser window to be opened as part of the execution which keeps the same session accross both?  Or is there a way of closing the original browser and opening up a new one with the same session?

    I have tried the blind mouse click and navigate to pop up window but none seem to work - i may well be missing something from these.

    Any help would be great.

    Thanks

    Maria

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 09 Dec 2015 Link to this post

    Hello Maria,

    I have tried the blind mouse click and navigate to pop up window...

    I don't quite follow what pop-up window your referring to here. Can you clarify? Web applications normally keep track of the session by using a browser cookie. What normally happens in web applications is when you click a link that opens a pop-up window the cookies are shared between those 2 windows which is how the new pop-up window is part of the same session.

    Test Studio can open and close browser windows, however every time you tell Test Studio to open a new browser window it's going to open it without sharing the session cookies. This is true for all browsers that Test Studio currently supports.

    What I'd like to do is take a step back and look at the problem from a high level. What automation challenge are you trying to solve? Maybe there's a different approach we can take to solving that problem.

    Regards,

    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Maria
    Maria avatar
    15 posts
    Member since:
    Oct 2011

    Posted 10 Dec 2015 Link to this post

    Hi Cody thanks for your reply.

    What I am trying to do is test our "remember me" functionality.  This only works though when you are in the same session - so the manual test says to log in - click remember me, open up a new tab then close the original one, load the web site again and you will be logged in automatically.

     Thanks

    Maria

  4. Answer
    Cody
    Admin
    Cody avatar
    3360 posts

    Posted 10 Dec 2015 Link to this post

    Hello Maria,

    ...click remember me, open up a new tab then close the original one, load the web site again and you will be logged in automatically.

    What you describe above is very different from the standard "remember me" functionality that I am used to with most websites. The standard functionality that I'm used to is, after you click "remember me", the browser will remember things like your user ID, or remember that you are logged in. You can then completely close the browser, go away and come back the next day, relaunch the browser, navigate to that website and it will remember your user ID but not your password or remember that you are logged in and you will remain logged in. This is done via stored cookies that are website specific, but these cookies are not session type cookies. Stored cookies are persisted to disk and reloaded the next time you load the browser and navigate to a specific website that stored that cookie in the first place. It has nothing to do with remaining in the current session.

    In contrast session cookies exist only for the life of the current session and are discarded when you close the current session. Unfortunately Test Studio is not capable of launching a new browser window and sharing existing session cookies. The launched browser window will load the stored cookies after you navigate to that specific website. Thus Test Studio cannot handle the test case you describe above, opening a new tab and sharing the session cookies with the previous tab. But I honestly question whether or not that's really necessary.

    So after that rather long-winded explanation, does your website really behave differently from the standard "remember me" functionality that I described above?

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  5. Maria
    Maria avatar
    15 posts
    Member since:
    Oct 2011

    Posted 16 Dec 2015 in reply to Cody Link to this post

    Hi Cody

    Yes, unfortunately it does!

    Thanks for your help anyway.

    regards

    Maria

  6. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 16 Dec 2015 Link to this post

    Hello Maria,

    Thank you for the update. I'm sorry I couldn't come up with a better answer for you.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  7. Maria
    Maria avatar
    15 posts
    Member since:
    Oct 2011

    Posted 16 Dec 2015 in reply to Cody Link to this post

    No problem at all Cody.  We are looking to implement this in the way you mentioned above so hopefully once that's done I an automate easier!

     Thanks again

    Maria

  8. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 16 Dec 2015 Link to this post

    Hello,

    You're very welcome.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top