Automating close and reopening window in selenium-ide

4,003 views
Skip to first unread message

amar

unread,
Sep 10, 2012, 5:41:31 AM9/10/12
to seleniu...@googlegroups.com

Hi,

How to automate close and reopening browser window in S-IDE.

Scenario:

a. User logins to the application.

b. Closes window - without loggin out.

c. Now open the browser - to verify whether user logged in our not.

Thanks,

Amar

sateesh babu

unread,
Sep 10, 2012, 6:14:54 AM9/10/12
to seleniu...@googlegroups.com

You can use directly close command in IDE. When you used close command the application will close.




--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/87T4bZ6mSkMJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
SATEESH BABU.K

amar

unread,
Sep 10, 2012, 6:52:53 AM9/10/12
to seleniu...@googlegroups.com
satish,

Im using close command to close the application, that is not a problem.
How do you reopen the application.??

-amar

sateesh babu

unread,
Sep 11, 2012, 1:37:10 AM9/11/12
to seleniu...@googlegroups.com
Hi Amar,

To reopen the application Use open command & in target place use URL of the application.



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/oE6cPuPhnPoJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
SATEESH BABU.K

amar

unread,
Sep 12, 2012, 12:55:13 AM9/12/12
to seleniu...@googlegroups.com
Hi Sateesh,

       I've tried using open and openWindow commands by passing URL.
I get error executing open command when browser is closed.
Also if i try executing scripts in S-RC, the error says cannot perform commands on dead object.

Note: Please find the attached snapshot of my scripts executing in S-IDE.


-Amar
Automating close and reopening window in selenium-ide.PNG

amar

unread,
Sep 12, 2012, 1:53:27 AM9/12/12
to seleniu...@googlegroups.com


kiisu

unread,
Sep 12, 2012, 12:42:50 PM9/12/12
to seleniu...@googlegroups.com
As far as I know in the IDE once you close all the windows you can't open a new one.  To work around this, first open a second window then close the null window. I'm not sure if this will be a valid scenario for your test as you haven't stated what your test goals, and expected results are.

openWindow | about:blank | newWindow
selectWindow | null
close
open | http://your url goes here

your main window will now be newWindow instead of null.

-kiisu

kazim jafri

unread,
Sep 12, 2012, 12:53:55 PM9/12/12
to seleniu...@googlegroups.com
Is anyone can help me to run Loop command in S-IDE

amar

unread,
Sep 13, 2012, 5:53:59 AM9/13/12
to seleniu...@googlegroups.com

Kiisu,

   Please checkout my testing plans in first post.

Im looking for automating the security part of the application.
1. The basic idea about the stated scenario is to close old session(close all browser windows) and open new session
2. After opening new session or browser enter url of the application and validate whether user logged into the application or not.

Since Im automating the security part. I shouldn't be opening the second window before closing the apllication.

-Amar

amar

unread,
Sep 13, 2012, 5:54:46 AM9/13/12
to seleniu...@googlegroups.com
Please do new posting

amar

unread,
Sep 13, 2012, 6:02:25 AM9/13/12
to seleniu...@googlegroups.com
Jaffery please do new posting i've solution for you.

kiisu

unread,
Sep 13, 2012, 12:16:20 PM9/13/12
to seleniu...@googlegroups.com
Amar,

Given that the IDE is a plugin that runs within firefox, you would have to have an external script/app close out the firefox process, re-open firefox, load the second part of your script and then autostart that script.

The changes to the selenium ide plugin I mention here: http://dsalyss.com/index.php/blog/making-selenium-ide-useful/ will make that partially possible.    It enables you to have an external application/command line argument start a selenium IDE session with a designated test suite and base url.  I haven't enabled autostart from the command line yet, although that may already be in there I haven't investigated yet.  Adding such a thing wouldn't be all that difficult.  You likely could hack something together as a workaround just using the patched selenium.ide plugin and the java control panel I made as a demo and then control that with something like autoit.  Not really the intention of why I made that but it could work :)

Curious as to why you would want to do that with the IDE, such a thing would be a lot less difficult with Webdriver or even the depreciated RC.

hope this helps!
-kiisu.


On Monday, September 10, 2012 2:41:31 AM UTC-7, amar wrote:
Reply all
Reply to author
Forward
0 new messages