Discussion
Iframe disappears while executing Selenium Webdriver scripts on a Pega 7.1.8 Customer service application in Internet Explorer
The application under test is Pega 7.1.8 based customer service application. The page where the issue happens contains multiple iframe. Mainly two iframe
- iframe1 with the application menu and tabs.
- iframe2 with actual content relevant to the tab.
While performing a click action on a button in the iframe2, iframe1 disappears. The HTML source has the iframe1 still present in it. In a first look there seems to be no attribute change like display from block to none.
This issue occurs only in Internet Explorer. Automation works perfectly fine in chrome.
This application is automated using Selenium Webdriver in Java. Considering the multiple frame presence, switch to frame functions in Expected Conditions feature, Implicit wait and explicit wait are appropriately used.
Tools:
Pega 1.7.8
Selenium Versions: 2.46, 2.47.0, 2.47.1
IE Driver: 2.46, 2.47
Internet Explorer: 9, 11
Relevant but very old issue: https://groups.google.com/forum/#!topic/selenium-users/GjBMDxkYm6k
This issued is caused by Selenium driver. With the same XPath, if the system could locate multi web elements, IEDriverServer will return "No element found " error and Chrome driver server will return the first one. If you are using Selenium IE Driver Server, make sure the Xpath you are using to allocate the web element is unique.