OS: Windows Selenium Version: 2.53.1.0 IDE: Visual Studio 2013 Browser: Internet Explorer 11 version 11.420
I am getting an exception when i tried to click an element on webpage. This happens when a link is clicked and it opens a dialog. Webelement.click() function clicks the element and the modal dialog is opened but Click() takes time to return and finally logs exception as 'The HTTP request to the remote WebDriver server for URL "" timed out after 60 seconds.'
It should click the "Firefox Beta" download button and "IE tool bar" with RUN and SAVE option will appear
It clicks the "Firefox Beta" download button and "IE tool bar" is coming. But downloadElement.Click() waits for 60 seconds and throws exception.
Below is code snippet:
string url = "https://www.mozilla.org/en-US/firefox/channel/#beta";
try{
IWebDriver driver = new InternetExplorerDriver();
driver.Navigate().GoToUrl(url);
Thread.Sleep(5000);
IWebElement downloadElement = driver.FindElement(By.XPath("//div[@id='download-button-desktop-beta']/ul/li/a/strong"));
Thread.Sleep(5000);
downloadElement.Click();
}catch{
//catch block
}
Try giving this xpath instead of that.
IWebElement downloadElement = driver.FindElement(By.XPath("/html/body/div[2]/div/main/section[1]/div/div/ul/li[1]/a/strong"));
Sometimes their is some problems with IE11 selenium is not able to work as expected. so i use double click instead of click in certain scenarios.
Actions action = new Actions(driver);
action.moveToElement(driver.findElement(By.xpath("/html/body/div[2]/div/main/section[1]/div/div/ul/li[1]/a/strong"))).doubleClick().perform();
try using both, hope it will helps