All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hu.ibello.expect.WebElementsHaveExpectations Maven / Gradle / Ivy

Go to download

Ibello is an easy-to-use automated test framework for web applications. It's public API is ibello-api.

There is a newer version: 1.22.0
Show newest version
/*
 * Ark-Sys Kft. licenses this file to you under
 * the Apache License, Version 2.0 (the "License"); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package hu.ibello.expect;

import hu.ibello.elements.WebElement;
import hu.ibello.elements.WebElements;

/**
 * Instance of this interface contains methods to create and execute expectations
 * about a collection of {@link WebElement} (or an instance of {@link WebElements}.
 * 

* About the ibello expectation engine, see {@link hu.ibello.expect}. *

* @author Kornél Simon * */ public interface WebElementsHaveExpectations { /** * An expectation which comes true when the element collection's size is the given one. * If this not occurs during the timeout, an exception will be thrown, * all information will be logged and the current test will fail. *

* If the method was called after {@link WebElementsExpectationBuilder#toNotHave()}, * then the outcome of the expectation is the opposite: it will fail if the size equals to the given one. *

* @param size expected size of element collection */ void size(int size); /** * An expectation which comes true when the element collection's size is greater than the given one. * If this not occurs during the timeout, an exception will be thrown, * all information will be logged and the current test will fail. *

* If the method was called after {@link WebElementsExpectationBuilder#toNotHave()}, * then the outcome of the expectation is the opposite: it will fail if the size is greater than the limit. *

* @param lowerLimit lower limit of element collection's size */ void sizeGreaterThan(int lowerLimit); /** * An expectation which comes true when the element collection's size is less than the given one. * If this not occurs during the timeout, an exception will be thrown, * all information will be logged and the current test will fail. *

* If the method was called after {@link WebElementsExpectationBuilder#toNotHave()}, * then the outcome of the expectation is the opposite: it will fail if the size is less than the limit. *

* @param upperLimit upper limit of element collection's size */ void sizeLessThan(int upperLimit); /** * An expectation which comes true when the element collection's size is between the given values. * It means that the size must be greater than or equal to the minSize, and it must be * less that or equal to the maxSize. * If this not occurs during the timeout, an exception will be thrown, * all information will be logged and the current test will fail. *

* If the method was called after {@link WebElementsExpectationBuilder#toNotHave()}, * then the outcome of the expectation is the opposite: it will fail if the size is between the given values. *

* @param minSize lower limit of element collection's size * @param maxSize upper limit of element collection's size */ void sizeBetween(int minSize, int maxSize); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy