Hot answers tagged

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....


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