I have a strange problem with webdriver. I have a local environment and a remote environment to run my tests; they work fine in Firefox in both environments, but with Internet Explorer 8 they only work on the local computer.
Whenever I run tests with a remote server, it doesnβt even find the text field elements for login. I use wait when searching for items, and I tried to increase the time to minutes, but nothing. I see an element in IE, looking at the source code. I even compared the html generated from both of them, and the same one.
I use selenium through JBehave (JBehave-web-selenium-3.3.4 with selenium-ie-driver-2.0b3)
To get the item I'm using:
public WebElement getElementById(String elementId){ return getMyWaiter() .waitForMe(By.id(elementId), TEST_DELAY_IN_S); } public WebElement waitForMe(By locator, int timeout) { WebDriverWait wait = new WebDriverWait(driver, timeout); return wait.until(Waiter.presenceOfElementLocated(locator)); } public static Function<WebDriver, WebElement> presenceOfElementLocated( final By locator) { return new Function<WebDriver, WebElement>() { @Override public WebElement apply(WebDriver driver) { return driver.findElement(locator); } }; }
Any idea why the different behavior?
source share