Lines Matching refs:by
18 * A callable function to be executed by WebDriverWait. It should return
30 * @return callable A callable function to be executed by WebDriverWait
131 * @param WebDriverBy $by The locator used to find the element.
134 public static function presenceOfElementLocated(WebDriverBy $by)
137 function (WebDriver $driver) use ($by) {
139 return $driver->findElement($by);
150 * @param WebDriverBy $by The locator used to find the element.
153 public static function presenceOfAllElementsLocatedBy(WebDriverBy $by)
156 function (WebDriver $driver) use ($by) {
157 $elements = $driver->findElements($by);
168 * @param WebDriverBy $by The locator used to find the element.
171 public static function visibilityOfElementLocated(WebDriverBy $by)
174 function (WebDriver $driver) use ($by) {
176 $element = $driver->findElement($by);
191 * @param WebDriverBy $by The located used to find the element.
194 public static function visibilityOfAnyElementLocated(WebDriverBy $by)
197 function (WebDriver $driver) use ($by) {
198 $elements = $driver->findElements($by);
237 * @param WebDriverBy $by The locator used to find the element.
241 public static function textToBePresentInElement(WebDriverBy $by, $text)
243 return self::elementTextContains($by, $text);
250 * @param WebDriverBy $by The locator used to find the element.
254 public static function elementTextContains(WebDriverBy $by, $text)
257 function (WebDriver $driver) use ($by, $text) {
259 $element_text = $driver->findElement($by)->getText();
273 * @param WebDriverBy $by The locator used to find the element.
277 public static function elementTextIs(WebDriverBy $by, $text)
280 function (WebDriver $driver) use ($by, $text) {
282 return $driver->findElement($by)->getText() == $text;
293 * @param WebDriverBy $by The locator used to find the element.
297 public static function elementTextMatches(WebDriverBy $by, $regexp)
300 function (WebDriver $driver) use ($by, $regexp) {
302 return (bool) preg_match($regexp, $driver->findElement($by)->getText());
315 * @param WebDriverBy $by The locator used to find the element.
319 public static function textToBePresentInElementValue(WebDriverBy $by, $text)
321 return self::elementValueContains($by, $text);
327 * @param WebDriverBy $by The locator used to find the element.
331 public static function elementValueContains(WebDriverBy $by, $text)
334 function (WebDriver $driver) use ($by, $text) {
336 $element_text = $driver->findElement($by)->getAttribute('value');
369 * @param WebDriverBy $by The locator used to find the element.
372 public static function invisibilityOfElementLocated(WebDriverBy $by)
375 function (WebDriver $driver) use ($by) {
377 return !$driver->findElement($by)->isDisplayed();
390 * @param WebDriverBy $by The locator used to find the element.
394 public static function invisibilityOfElementWithText(WebDriverBy $by, $text)
397 function (WebDriver $driver) use ($by, $text) {
399 return !($driver->findElement($by)->getText() === $text);
412 * @param WebDriverBy $by The locator used to find the element
415 public static function elementToBeClickable(WebDriverBy $by)
417 $visibility_of_element_located = self::visibilityOfElementLocated($by);
461 * Wrapper for a condition, which allows for elements to update by redrawing.