2gis / Winium.Desktop

Winium.Desktop is Selenium Remote WebDriver implementation for automated testing of Windows application based on WinFroms and WPF platforms.
Mozilla Public License 2.0
402 stars 140 forks source link

switching windows through winium #349

Open nissysaju opened 3 years ago

nissysaju commented 3 years ago

I am automating an application where I have to click elements on next window after login . Below is the issue that I am observing, which is making my scripts fail.

Login is a small splash screen , which opens and I entered the Username and password correctly and logged in successfully

After that another screen is open(containing further functionalities) , and I'm able to locate the new window and but not able to click anything in that window.

I tried using this (web element is found , and line "the order button" gets printed but then no action is performed)

WebElement loginFrame = driver.findElementByClassName("classname of 2nd screen"); System.out.println("Click the Orders Button ............."); loginFrame.findElement(By.name("button")).click();

If anybody knows how to handle the switching between the windows or have any suggestions . Please let me know .