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

hu.ibello.search.By 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.search;

/**
 * This enum symbolizes an element search algorithm.
 * During element search on web-pages, a search algorithm and a search pattern is used
 * to find the desired elements. The meaning of the pattern is specified by the search algorithm
 * (an enum constant).
 * 

About ibello search engine see {@link hu.ibello.search}.

* @author Kornél Simon * */ public enum By { /** * Search by CSS selector. The search pattern can be any valid CSS selector. */ CSS_SELECTOR, /** * Search by ID. The search pattern is an ID of an element. */ ID, /** * Search by name. The search pattern if the value of the name attribute * of the desired element(s). */ NAME, /** * Search by tag name. The search pattern is the tag name of the desired element(s). */ TAG_NAME, /** * Search by CSS class name. The search pattern is a CSS cass name which is assigned to * the desired element(s). */ CLASS_NAME, /** * Search by text of a button. The search pattern is the case-sensitive caption of the desired element. * The element itself can be: *
    *
  • a button with the given text,
  • *
  • an input field for which the value attribute is the given text, * and the type attribute is button, submit or reset,
  • *
  • an input field for which the alt attribute is the given text, * and the type attribute is image
  • *
  • an a (link) element with the given text,
  • *
  • an element with role=button attribute.
  • *
* During the search, the first two categories are preferred. It means that if the search results a positive * outcome for the first category, then the other categories are not searched. */ BUTTON_TEXT, /** * Search by the text of an element. The search pattern is the case-sensitive content of the desired element. */ TEXT, /** * Search by label. The search pattern is the case-sensitive content of a label element. * The label should belong to the desired element. It means that: *
    *
  • * The label has a for attribute, and the value of this attribute matches the * id attribute of the desired element. *
  • *
  • * The label does not have for attribute, but there is a single input, * textarea or select element inside of it's parent or it's grandparent - * that single element will be the desired one. *
  • *
*/ LABEL; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy