Skip to content
This repository has been archived by the owner. It is now read-only.

driver.maage().timeouts().implicitlyWait() being ignored #5092

Closed
lukeis opened this issue Mar 4, 2016 · 2 comments
Closed

driver.maage().timeouts().implicitlyWait() being ignored #5092

lukeis opened this issue Mar 4, 2016 · 2 comments

Comments

@lukeis
Copy link
Member

@lukeis lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 5092

What steps will reproduce the problem?
1. Create a script with a driver.manage().timeouts().implicitlyWait() command. Run
the script. The timeout command is being ignored

What is the expected output? What do you see instead?
The expected behavior is that the script waits to continue execution until the timeout
length has expired and then continues on. I am seeing instead that the command is being
ignored, which in my case is making tests fail.

Selenium version: 2.29.o
OS: Mac OSx, Windows 7
Browser:FF 18, 17, IE 9
Browser version:


Please provide any additional information below.

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;

public class TestForSeleniumBugTicket
{
Browser browser = new Browser();
WebDriver driver;
private void testForBugTicket(String driverName)
{
//Launch browser and navigate to Google.com
driver = browser.getDriver(driverName);
driver.get("http://www.google.com");
driver.manage().window().maximize();
//Input search criteria
WebElement searchBox = driver.findElement(By.id("gbqfq"));
searchBox.click();
searchBox.sendKeys("Selenium Ignores Implicit Wait Command");
//Implicit Wait Command should wait 30 seconds before moving onto the next step
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//Click Google Search button
WebElement searchBtn = driver.findElement(By.id("gbqfba"));
searchBtn.click();
}
@Test
public void test_TestforBugTicket()
{
testForBugTicket("firefox");
}
@AfterMethod
public void tearDown()
{
driver.quit();
}
}

Reported by curtis.salisbury on 2013-01-29 16:16:50

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

Implicit waits apply to findElement and findElements only. Other selenium methods are
asynchronous. Use either 'sleep' or explicit waits, see [1] and [2]

[1] http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp#explicit-and-implicit-waits
[2] https://blog.mozilla.org/webqa/2012/07/12/how-to-webdriverwait/

Reported by barancev on 2013-01-29 18:47:12

  • Status changed: WorkingAsIntended
  • Labels removed: Status-Untriaged

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:16:39

  • Labels added: Restrict-AddIssueComment-Commit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant