WebDriverWait wait = new WebDriverWait(driver,30);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("(//a[contains(text(),'Download')])")));
WebElement download = driver.findElement(By.xpath("(//a[contains(text(),'Download')])"));
download.click();
I am trying to click a download link in a chrome via selenium. It has many other links in the page and those are working but this download link alone causes timeout exception
.
And the anchor tag in the page is as follows
<a href="https://www.somexyz.com/key/url?url=http%3A//www.somexyz.net/webform_protected_file/lwhW0167ec9HZBEefQrIoSg6JpnW0zvlQyxL-iaR8Ms/download" target="_other" rel="nofollow">Download file</a>
Any suggestions would be appreciated.