You are here

public function BrowserPageElementTrait::find in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/jcalderonzumba/gastonjs/src/Browser/BrowserPageElementTrait.php \Zumba\GastonJS\Browser\BrowserPageElementTrait::find()

Find elements given a method and a selector

Parameters

$method:

$selector:

Return value

array

File

vendor/jcalderonzumba/gastonjs/src/Browser/BrowserPageElementTrait.php, line 16

Class

BrowserPageElementTrait
Trait BrowserPageElementTrait @package Zumba\GastonJS\Browser

Namespace

Zumba\GastonJS\Browser

Code

public function find($method, $selector) {
  $result = $this
    ->command('find', $method, $selector);
  $found["page_id"] = $result["page_id"];
  foreach ($result["ids"] as $id) {
    $found["ids"][] = $id;
  }
  return $found;
}