I'm learning Mink, and want to find an API reference. I've dug into the Mink source code for answers, but am baffled.
The documentation gives examples of its use:
$session->getPage()->hasContent("bla");
$session->getPage()->find('css', 'title')->getText();
But nowhere in the source can I find these methods getPage
, getText
, find
, hasContent
. (Yet they seem to work).
Mink seems to make the most out of OOP patterns, and I'm obviously not bright enough to work out what on earth is going on! Can anyone give me a link to API reference, or help understanding where these methods are defined?
For example, I've been puzzling why this doesn't work:
$this->assertTrue($session->getPage()->find('css', 'title')->hasContent("Part of the page's Title"));
(I get the error Call to undefined method Behat\Mink\Element\NodeElement::hasContent()
)
But I can't find a glass called NodeElement
, let alone what methods it has that I can use.