Permalink
Browse files

Merge pull request #83 from FraBo67/localMod

waitUntilXyzDoesNotContainxxx / getWindowSize
  • Loading branch information...
2 parents ba17c7f + fb87fa6 commit 7d57f2f5bb27571ecccccab900392ccc5ff03544 @MarkusBernhardt committed on GitHub Jun 22, 2016
@@ -602,6 +602,7 @@ public void maximizeBrowserWindow() {
*
* @return The window <b>width</b> and <b>height</b> in px.
*/
+ @RobotKeyword
public Object[] getWindowSize() {
Dimension size = getCurrentWebDriver().manage().window().getSize();
return new Object[] { Integer.toString(size.width), Integer.toString(size.height) };
@@ -158,6 +158,36 @@ public boolean isFinished() {
}
@RobotKeywordOverload
+ public void waitUntilPageDoesNotContain(String condition, String timeout) {
+ waitUntilPageDoesNotContain(condition, timeout, null);
+ }
+
+ @RobotKeywordOverload
+ public void waitUntilPageDoesNotContain(String condition) {
+ waitUntilPageDoesNotContain(condition, null);
+ }
+
+ /**
+ * Waits until the current page does not contain <b>text</b>.<br>
+ * <br>
+ * Fails, if the timeout expires, before the text disappears. <br>
+ * <br>
+ * See `Introduction` for details about timeouts.<br>
+ *
+ * @param text
+ * The text to verify.
+ * @param timeout
+ * Default=NONE. Optional timeout interval.
+ * @param message
+ * Default=NONE. Optional custom error message.
+ */
+ @RobotKeyword
+ @ArgumentNames({ "text", "timeout=NONE", "message=NONE" })
+ public void waitUntilPageDoesNotContain(final String text, String timeout, String message) {
+ waitUntilPageNotContains(text, timeout, message);
+ }
+
+ @RobotKeywordOverload
public void waitUntilPageContainsElement(String condition) {
waitUntilPageContainsElement(condition, null);
}
@@ -238,6 +268,37 @@ public boolean isFinished() {
}
@RobotKeywordOverload
+ public void waitUntilPageDoesNotContainElement(String locator) {
+ waitUntilPageDoesNotContainElement(locator, null);
+ }
+
+ @RobotKeywordOverload
+ public void waitUntilPageDoesNotContainElement(String locator, String timeout) {
+ waitUntilPageDoesNotContainElement(locator, timeout, null);
+ }
+
+ /**
+ * Waits until the element identified by <b>locator</b> is not found on the
+ * current page.<br>
+ * <br>
+ * Fails, if the timeout expires, before the element disappears. <br>
+ * <br>
+ * See `Introduction` for details about locators and timeouts.<br>
+ *
+ * @param locator
+ * The locator to locate the element.
+ * @param timeout
+ * Default=NONE. Optional timeout interval.
+ * @param message
+ * Default=NONE. Optional custom error message.
+ */
+ @RobotKeyword
+ @ArgumentNames({ "locator", "timeout=NONE", "message=NONE" })
+ public void waitUntilPageDoesNotContainElement(final String locator, String timeout, String message) {
+ waitUntilPageNotContainsElement(locator, timeout, message);
+ }
+
+ @RobotKeywordOverload
public void waitUntilElementIsVisible(String locator, String timeout) {
waitUntilElementIsVisible(locator, timeout, null);
}

0 comments on commit 7d57f2f

Please sign in to comment.