Using the driver I can open my application and click a button. The button however launches a new window. Looking at the webDriver.PageSource or trying to find element by the name show no sign of any of the controls of the new window. Is there a way to achieve this?
Got it working sporadically. Using the the Selenium popupWindowFinder in the same way as you would a browser -
_mainWindowHandle = _webDriver.CurrentWindowHandle;
var finder = new PopupWindowFinder(_webDriver);
var popupWindowHandle = finder.Click(SearchButton);
_webDriver.SwitchTo().Window(popupWindowHandle);
I'm trying to use this method with Java in a WPF application, but it won't work. Can't switch between the pop-up and the main window. Is it because the application is WPF? If so is there any solutions?
if you can't find the popup in your current session then it probably isn't parented to your application window. Could you use inspect.exe to check. If that's the case you'll need to create a desktop session to find your popup window. The other area is the find method being used and whether you can use a different element attribute and find method to find the window.
What you're wanting to do should work.
Most helpful comment
Got it working sporadically. Using the the Selenium popupWindowFinder in the same way as you would a browser -