This is a migrated thread and some comments may be shown as answers.

New Tab or browser window that keeps the same session

7 Answers 1361 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Maria
Top achievements
Rank 1
Maria asked on 08 Dec 2015, 03:42 PM

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

7 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 09 Dec 2015, 08:52 PM
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!
0
Maria
Top achievements
Rank 1
answered on 10 Dec 2015, 10:11 AM

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

0
Accepted
Cody
Telerik team
answered on 10 Dec 2015, 07:14 PM
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!
0
Maria
Top achievements
Rank 1
answered on 16 Dec 2015, 09:01 AM

Hi Cody

Yes, unfortunately it does!

Thanks for your help anyway.

regards

Maria

0
Cody
Telerik team
answered on 16 Dec 2015, 02:53 PM
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!
0
Maria
Top achievements
Rank 1
answered on 16 Dec 2015, 03:02 PM

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

0
Cody
Telerik team
answered on 16 Dec 2015, 04:34 PM
Hello,

You're very welcome.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Maria
Top achievements
Rank 1
Answers by
Cody
Telerik team
Maria
Top achievements
Rank 1
Share this question
or