can anyone please help me.
Below are the details:
Code :---
System.setProperty("webdriver.ie.driver", "C:\\Users\\sb158h\\Desktop\\Sidharth\\Eclipse\\Selenium\\IEDriverServer_Win32_2.44.0\\IEDriverServer.exe");
wb =new InternetExplorerDriver();
wb.get("
http://d1tvt1z1.vci.att.com:1410/devonly/login/login.htm");
WebDriverWait wdw=new WebDriverWait(wb, 90);
wdw.until(ExpectedConditions.elementToBeClickable(By.name("userId")));
Thread.sleep(100);
wb.findElement(By.name("userId")).sendKeys("tm1084");
parent=wb.getWindowHandle();
System.out.println(parent);
wb.findElement(By.xpath("//input[@alt='login']")).click();
// wb.switchTo().window(parent);
Set<String> child =wb.getWindowHandles();
System.out.println(child);
int cnt =child.size();
System.out.println("count " +cnt);
for (String eachchild:child){
if (!(eachchild.equals(parent)))
{
System.out.println(eachchild);
wb.switchTo().window(eachchild);
break;
}
}
// Below userId is on newly opened window
wdw.until(ExpectedConditions.elementToBeClickable(By.name("userId")));
wb.findElement(By.name("userId")).sendKeys("tm1084");
-------------------------------------------------------------------------------------------------------
Execution Result :
Started InternetExplorerDriver server (32-bit)
2.44.0.0
Listening on port 45810
de737d52-2bdc-45b5-bb53-f0a3a11f7777
[de737d52-2bdc-45b5-bb53-f0a3a11f7777]
count 1
Nov 17, 2014 3:03:00 PM org.openqa.selenium.support.ui.ExpectedConditions findElement
Session ID: b01a7d26-c8ee-4520-abb9-7caa50d271ee
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, enablePersistentHover=true, ignoreZoomSetting=false, ie.ensureCleanSession=false, browserName=internet explorer, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss, version=8, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, initialBrowserUrl=
http://localhost:45810/, handlesAlerts=true, ie.forceCreateProcessApi=false, nativeEvents=true, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:352)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByName(RemoteWebDriver.java:425)
at
org.openqa.selenium.By$ByName.findElement(By.java:299)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)
at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:730)
at org.openqa.selenium.support.ui.ExpectedConditions.access$0(ExpectedConditions.java:728)
at org.openqa.selenium.support.ui.ExpectedConditions$4.apply(ExpectedConditions.java:130)
at org.openqa.selenium.support.ui.ExpectedConditions$4.apply(ExpectedConditions.java:1)
at org.openqa.selenium.support.ui.ExpectedConditions$17.apply(ExpectedConditions.java:528)
at org.openqa.selenium.support.ui.ExpectedConditions$17.apply(ExpectedConditions.java:1)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
at Script.Login.main(Login.java:69)
Nov 17, 2014 3:03:00 PM org.openqa.selenium.support.ui.ExpectedConditions findElement