-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -273,7 +273,7 @@ private static boolean isThrowableCausedBy(final Throwable throwable, Class<? ex | |
*/ | ||
public static Condition matchesValue(String text) | ||
{ | ||
return matchValue(text); | ||
return matchValue(".*" + text + ".*"); | ||
} | ||
|
||
/** | ||
|
@@ -291,7 +291,7 @@ public static Condition matchesValue(String text) | |
*/ | ||
public static Condition matchValue(final String regex) | ||
{ | ||
return matchesAttribute("value", regex); | ||
return Condition.attributeMatching("value", regex); | ||
} | ||
|
||
/** | ||
|
@@ -301,13 +301,16 @@ public static Condition matchValue(final String regex) | |
* Sample: <code>$("input").waitWhile(matchesValue("foo"), 12000)</code> | ||
* </p> | ||
* | ||
* @deprecated Not needed anymore since it's supported by Selenide. Will be removed with the next major version. Use | ||
* com.codeborne.selenide.Condition.attributeMatching instead. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
* @param attributeName | ||
* The name of the attribute that should contain the text | ||
* @param text | ||
* The text that should be contained within the attribute | ||
* @return a Selenide {@link Condition} | ||
* @see #matchAttribute(String, String) | ||
*/ | ||
@Deprecated | ||
public static Condition matchesAttribute(String attributeName, String text) | ||
{ | ||
return matchAttribute(attributeName, text); | ||
|
@@ -320,14 +323,17 @@ public static Condition matchesAttribute(String attributeName, String text) | |
* Sample: Assert that given element's value attribute matches given regular expression | ||
* <code>$("input").should(matchValue("Hello\s*John"))</code> | ||
* </p> | ||
* | ||
* | ||
* @deprecated Not needed anymore since it's supported by Selenide. Will be removed with the next major version. Use | ||
* com.codeborne.selenide.Condition.attributeMatching instead. | ||
* @param attributeName | ||
* The name of the attribute that should be matched with the regex | ||
* @param regex | ||
* e.g. Kicked.*Chuck Norris - in this case ".*" can contain any characters including spaces, tabs, CR | ||
* etc. | ||
* @return a Selenide {@link Condition} | ||
*/ | ||
@Deprecated | ||
public static Condition matchAttribute(final String attributeName, final String regex) | ||
{ | ||
return new Condition("match " + attributeName) | ||
This comment has been minimized.
Sorry, something went wrong.
h-arlt
Contributor
|
||
|
Please link appropriately such that user can directly jump to JavaDoc of referenced method:
Please also adjust JavaDoc below.