- update the comment about firefox version requirement

- use contains instead of equals as HTML may return multiple spaces
This commit is contained in:
Prabhjyot Singh 2015-12-04 13:24:55 +05:30
parent 5bf00f3054
commit 7d75b88277

View file

@ -17,20 +17,10 @@
package org.apache.zeppelin;
import static org.junit.Assert.*;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.TimeoutException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxDriver;
@ -40,11 +30,17 @@ import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.util.LinkedList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
/**
* Test Zeppelin with web brower.
*
*
* To test, ZeppelinServer should be running on port 8080
* On OSX, you'll need firefox 31.0 installed.
* On OSX, you'll need firefox 42.0 installed.
*
*/
public class ZeppelinIT {
@ -141,9 +137,11 @@ public class ZeppelinIT {
(new WebDriverWait(driver, 60)).until(new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver d) {
return driver.findElement(By.xpath(getParagraphXPath(paragraphNo)
+ "//div[@class=\"control\"]//span[1][text()=\" " + state + " \"]"))
+ "//div[@class='control']//span[1][contains(.,'" + state + "')]"))
.isDisplayed();
};
}
;
});
}