我使用UISpy
来标识Windows桌面应用程序的元素。我使用元素的AutomationId如下:
WiniumDriver driver = new WiniumDriver(new URL("http://localhost:9999"), option);
driver.findElement(By.id("JavaFX98")).click();
在执行过程中出现异常,我也尝试通过名称来标识相同的元素:
Exception in thread "main" org.openqa.selenium.NoSuchElementException:
Element cannot be found (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 30.45 seconds