I perform such steps in an automated test case:
- Login to an application
- Switch to a frame with title "Main Menu" (example)
- Select and click desired element from: "Main Menu > Sub Menu 1> Sub Menu 2 > Search": When "Search" is clicked then a new child window with it's own url is opened. The "Search" click also changes frame in the background, it triggers a page reload and so "Main Menu" changes into "Detailed Menu".
- When some id is given on child window and search button on child window is clicked, then child window will be closed and "Detailed Menu" will be updated with information for this particular id.
Problem:
When IE driver (version 3.14.0.0) clicks search button from "Main Menu > Sub Menu 1> Sub Menu 2 > Search" then child window which is opened does not contain all information. It looks like it's ok, but after looking at it's properties the url indicates that it's a blank html page. Because it's blank/disabled I cannot switch to it, find any element or click any button.
I managed to do above test steps with ChromeDriver, but the test must be executed using IE driver (application requirements).
I also tried setting capabilities of IE driver as stated in: How can I start InternetExplorerDriver using Selenium WebDriver but I can't modify any Internet Explorer security options, because these options are disabled.
I noticed that when I use the following code after driver performs "Main Menu > Sub Menu 1> Sub Menu 2 > Search":
foreach (var process in Process.GetProcessesByName("IEDriverServer"))
{
process.Kill();
}
Then child window becomes fully operational, but of course driver session is over, so I can't proceed with later steps anyway.
Question:
Is there a way to pause driver's processes after it performs click, wait for child window to be fully loaded, then resume processes so it can switch to a child window etc? If not is there a way to attach this window to current browser session?