PathFunction

org.specs2.matcher.PathFunction
case class PathFunction(node: Node, function: XPathFunction, attributes: List[String], attributeValues: Map[String, String], exactMatch: Boolean, textMessage: Option[String], textMatcher: Matcher[String]) extends Seq[Node] => Seq[Node], XPathFunctions

The PathFunction object encapsulate a search for a node and/or attributes or attributeValues with an XPath function If node has some children, then they are searched using equality

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Seq[Node] => Seq[Node]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type XPathFunction = (Node, String) => NodeSeq

Attributes

Inherited from:
XPathFunctions

Value members

Concrete methods

def apply(nodes: Seq[Node]): Seq[Node]

Attributes

Returns

the node if it is found and matching the searched attributes and/or attribute values when specified

def nodeLabel: String

Attributes

Returns

"subnode" or "node" depending on the type of search a direct child search or a general search

def searchedAttributes: String

Attributes

Returns

a string representation of attributes or attributeValues (one of them being empty by construction)

def searchedElements: String

Attributes

Returns

a string representing the searched nodes, attributes, attribute values

def textIs(t: String): PathFunction

add a matcher for the node text

add a matcher for the node text

Attributes

def textMatches[T](t: T)(using evidence$3: MatchingExpression[T]): PathFunction

add a matcher for the node text with a regular exp

add a matcher for the node text with a regular exp

Attributes

Inherited methods

def andThen[A](g: Seq[Node] => A): T1 => A

Attributes

Inherited from:
Function1
def compose[A](g: A => Seq[Node]): A => R

Attributes

Inherited from:
Function1
def deepNodeSearch(node: Node, label: String): NodeSeq

Attributes

Returns

the \ XPath function

Inherited from:
XPathFunctions
def firstNodeSearch(node: Node, label: String): NodeSeq

Attributes

Returns

the \ XPath function

Inherited from:
XPathFunctions
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1