Hot answers tagged

4

You should not be running tests on a machine used by user(s). Set up a dedicated computer or VM for testing and and use headless browser mode (more info here and here).


2

It seems the second page is opening in a new tab, please switch the tab before interacting with the page: driver.findElement(By.xpath("/html/body/div[4]/div[2]/div[2]/div[2]/div[2]/div[2]/div[2]/div/div[4]/div[1]/div/div/div[2]/div[1]/span[1]/strong/span/div/ul/li[1]/span/a")).click(); ArrayList<String> tabs = new ArrayList<String>(driver....


1

Refer to this question: https://stackoverflow.com/q/34152390/6793637 chrome.window.onRemoved.addListener(), works only when a chrome process is running. The `driver.quit()` closes all the chrome processes. Use driver.close() or Could you try this : // Initializing instance of Firefox WebDriver driver = new ChromeDriver(); wait = new ...


1

For of all thank everyone for your help! The answer was quite simple and I hope some of the senior members dont get mad. In order to access the elements on the second page all I that needed to be done is switch to the correct tab. ArrayList<String> tabs2 = new ArrayList<String>(driver.getWindowHandles()); driver.switchTo().window(tabs2....


1

It turns out the reason chromedriver knows where chrome is installed is it looks for it in the default installation locations. See chromedriver requirements I ended up using writing this script. def chrome_version(): osname = platform.system() if osname == 'Darwin': installpath = "/Applications/Google\ Chrome.app/Contents/MacOS/Google\ ...


1

You can obtain the browser version via WebDriver like this: Capabilities cap = ((ChromeDriver) driver).getCapabilities(); System.out.println(cap.getVersion()); I have tested it on Windows using old WebDriver version (2.44) vs current Chrome (78), I am not sure how this will work with new WebDriver vs old chrome on Ubuntu.


1

"Before a new major version of Chrome goes to Beta, a matching version of ChromeDriver will be released." It means you can ask for the specific beta target version (currently 75) from your dependency management system and indicate the location of your Chrome Beta.


Only top voted, non community-wiki answers of a minimum length are eligible