I am currently automating an application based on IBM Cognos platform using selenium + Cucumber + Internet Explorer and is facing some challenges. I need some expert help from this group on the issues.
Problem Description - Upon clicking a link on the page, new browser get opened. Ideally, getWindowHandles() method returns correct count of browser opened by WebDriver. We switch to 2nd browser using window handle property, further action will be performed on second browser. GetWindowHandles is returning value 1 irrespective of number of browser opened by WebDriver. I have tried following methods –
- Click() on the link & tried getWindowHandles()
- Keys.Enter on the link & getWindowHandles()
- sendkeys(“\0”) on the link & getWindowHandles()
- MouseHover on the link, click on the link & getWindowHandles
- Double click on the link & getWindowHandles
- Opened New tab using sendkeys(keys.control +”t”), navigated to URL & getWindowHandles()
- Opened new browser window using sendkeys(keys.control +”n”), navigated to URL & getWindowHandles()
Environment used – Selenium WebDriver – 2.39.0 IEDriverServer.exe - Win32_2.39.0 Windows 7 Internet Explorer 8.0
Note – it is working fine on Firefox, this issue is happening on IE only.