desiredcapabilities

Selenium not detecting the second window in IE

女生的网名这么多〃 提交于 2019-11-27 06:59:05
问题 My application opens up a new window on clicking a button and i need to perform some actions in that window. But the response getWindowHandles() method of selenium webdriver has only one window id in it. This happens especially if there is a delay in calling the getWindowHandles() after opening the new window. There is a known issue with selenium. https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration But even the solution for that is not working for me.

ChromeDriver(Capabilities capabilities) is deprecated

大兔子大兔子 提交于 2019-11-27 02:24:51
问题 I use ChromeDriver 2.33 with WebDriver 3.6.0 and try to set default directory for file download. Map<String, Object> prefs = new HashMap<String, Object>(); prefs.put("download.default_directory", Vars.DOWNLOAD_FOLDER_ROOT); DesiredCapabilities caps = DesiredCapabilities.chrome(); ChromeOptions options = new ChromeOptions(); options.addArguments("--start-maximized"); options.setExperimentalOption("prefs", prefs); caps.setCapability(ChromeOptions.CAPABILITY, options); driver = new ChromeDriver

Selenium InternetExplorerDriver doesn't get focus on the window

梦想的初衷 提交于 2019-11-26 17:52:30
问题 My project includes Selenium webdriver, JAVA, Maven, TestNG, Jenkins, Allure (reports). I have a few suites of tests with 100+ test cases, and I iterate them through 3 different browsers (the tests run in parallel using TestNG). There is one test that can't pass unless I am actually watching the window and see the test run. I will explain: what am I trying to test? our JS developers created a feature that only if the user has focus on the window, then a image slideshow will start to move and