David Fliguer
David Fliguer

Reputation: 445

Selenium timeout after clicking on an element but page seems to load correctly (ChromeDriver)

I'm facing a strange problem and I can't figure out why it is happening.

My code is written on C# and I'm using ChromeDriver

I'm clicking on an element (Actually sending SendKey(Keys.ENTER) but same problem happens when I use regular .Click())

The click seems to work OK (The element is found and I'm redirected to the page that I'm expecting (This is a complex process that runs behind with SSO)) but the code doesn't continue its execution

After some time it throws exception http://localhost:7183/session/ca0fc76d263cb413b3a06f69fa5eff7e/element/0.8505282587588259-1/value timed out after 120 seconds.

If I run the same code with FirefoxDriver or IEDriver it works OK

Upvotes: 0

Views: 1522

Answers (2)

Gsanez
Gsanez

Reputation: 61

I have a similar problem and I set this timeout manager in the ChromeDriver execution, now it will wait 60 secs before gets the timeout error. driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(60);

Upvotes: 0

Dazed
Dazed

Reputation: 1551

Are you using the latest version of ChromeDriver? There were some issues with send keys that were fixed in 2.24.

Maybe try a js click?

WebElement element = driver.findElement(By.id("gbqfd"));
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", element);

Upvotes: 1

Related Questions