HumHub Documentation (unofficial)

ElementLocator

Table of Contents

Methods

_findElements()  : array<string|int, mixed>
Locates element using available Codeception locator types:

Methods

_findElements()

Locates element using available Codeception locator types:

public _findElements(mixed $locator) : array<string|int, mixed>
APIYes
  • XPath
  • CSS
  • Strict Locator

Use it in Helpers or GroupObject or Extension classes:

<?php
$els = $this->getModule('{{MODULE_NAME}}')->_findElements('.items');
$els = $this->getModule('{{MODULE_NAME}}')->_findElements(['name' => 'username']);

$editLinks = $this->getModule('{{MODULE_NAME}}')->_findElements(['link' => 'Edit']);
// now you can iterate over $editLinks and check that all them have valid hrefs

WebDriver module returns Facebook\WebDriver\Remote\RemoteWebElement instances PhpBrowser and Framework modules return Symfony\Component\DomCrawler\Crawler instances

Parameters
$locator : mixed
Return values
array<string|int, mixed>

of interactive elements


        
On this page

Search results