Hi Murali,

No error message it is showing but it is going to the line
driver.switchTo().window(popupWindowHandle);

I was printing how many windows are opened also and it was printing 2 in
the console...

Thanks,

Sudhansu


On Saturday, 21 February 2015 17:04:08 UTC+5:30, Sudhansu Sekhar panda
wrote:
Hi All,

I am unable to switch to the new window in IE browser but the same code is
working fine in Firefox.

String popupWindowHandle = null;
for (String handle : driver.getWindowHandles()) {

if (!handle.equals(currentWindow)) {
popupWindowHandle = handle;
driver.switchTo().window(popupWindowHandle);
driver.close();
driver.switchTo().window(currentWindow);
}
}

Thanks,

Sudhansu
--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2f14d90e-b79f-443d-8265-25cb98afe001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 15 | next ›
Discussion Overview
groupselenium-users @
categoriesselenium
postedFeb 21, '15 at 11:34a
activeFeb 26, '15 at 6:56a
posts15
users7
websiteseleniumhq.org

People

Translate

site design / logo © 2021 Grokbase