Issue 3494 in selenium: IE

0 views
Skip to first unread message

sele...@googlecode.com

unread,
Mar 5, 2012, 8:40:23 AM3/5/12
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3494 by francis....@gmail.com: IE
http://code.google.com/p/selenium/issues/detail?id=3494

Before filing an issue, please read the page at
http://code.google.com/p/selenium/wiki/SeleniumHelp This contains lot of
information about how best to get help, and tells you what we need to know.

Still here? We know that bugs are frustrating and annoying things. We also
know that you've probably spent ages trying to figure out what's wrong. The
more information you give us now, the more likely it is that we'll be able
to help.

What steps will reproduce the problem?
1.I enter a web page which contains these script :
var spec
= "resizable=yes,location=no,toolbar=no,status=no,left=0,top=0,width=400"
+ ",height=500" ;
var newWindow = window.open("/index.bak.html","_blank",spec);

if(newWindow != null && newWindow != undefined &&
newWindow != 'undefined')
{
newWindow.resizeTo(405, 505);
window.opener = "";
window.open("","_self");
window.close();
}


2.I run the test in the IE8:
@Test
public void testItWolf() throws Exception {
SeleniumServer server = new SeleniumServer();
server.start();

Selenium selenium = new DefaultSelenium("localhost", 4444, "*iexplore",
"http://itwolf.us/");
selenium.start();

selenium.open("/");
selenium.click("//A[@id='test_link']");
/**
* all these code below tell me : ERROR: Current window or frame is
* closed!
*
* selenium.getLocation();
* selenium.getAllWindowIds();
* selenium.getAllWindowTitles();
* selenium.getAllWindowNames(); .....
*/
selenium.selectWindow("var=newWindow");//
com.thoughtworks.selenium.SeleniumException:
// ERROR: Command execution
// failure. Please search the
// user group at
// https://groups.google.com/forum/#!forum/selenium-users
// for error details from the
// log window.

selenium.close();
server.stop();
}

What is the expected output? What do you see instead?
I want to select the new Window in IE (I find these code in firefox is
OK!). But I see the errors below:
com.thoughtworks.selenium.SeleniumException: ERROR: Command execution
failure. Please search the user group at
https://groups.google.com/forum/#!forum/selenium-users for error details
from the log window. The error message is:
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:106)
at
com.thoughtworks.selenium.DefaultSelenium.selectWindow(DefaultSelenium.java:370)
at ngcrm.test.TestMain.testItWolf(TestMain.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

When I try to solve the problem , I find more problems:

selenium.click("//A[@id='test_link']");
//---------------------------<<CLICK>>
/**
* all these code below tell me : ERROR: Current window or frame is
* closed!
*
* selenium.getLocation(); //I place these code after <<CLICK>>,i get
the error info: ERROR: Current window or frame is closed!
* selenium.getAllWindowIds();
* selenium.getAllWindowTitles();
* selenium.getAllWindowNames(); .....
*/


Selenium version:2.20.0
OS:win 7 64/32
Browser:IE
Browser version:8/9


Please provide any additional information below. A sample reduced test
case, or a public URL that demonstrates the problem will intrigue our merry
band of Open Source developers far more than nothing at all: they'll be far
more likely to look at your problem if you make it easy for them!


//---------------------------------
@Test
public void testItWolf() throws Exception {
SeleniumServer server = new SeleniumServer();
server.start();

Selenium selenium = new DefaultSelenium("localhost", 4444, "*iexplore",
"http://itwolf.us/");
selenium.start();

selenium.open("/");
selenium.click("//A[@id='test_link']");

selenium.selectWindow("var=newWindow");

selenium.close();
server.stop();
}
//---------------------------------

sele...@googlecode.com

unread,
Mar 5, 2012, 8:48:43 AM3/5/12
to selenium-develope...@googlegroups.com

Comment #1 on issue 3494 by francis....@gmail.com: IE
http://code.google.com/p/selenium/issues/detail?id=3494

I forget to edit the title.which is :
when a page close itself and open a new window in IE8/9, Selenium can not
select the new Window,while in Firefox it is OK!

Reply all
Reply to author
Forward
0 new messages