Find all WebDriverElements within this element using the given mechanism.

@param WebDriverBy $by
@return RemoteWebElement[] A list of all WebDriverElements, or an empty
array if nothing matches
@see WebDriverBy
769786
public function findElements(WebDriverBy $by)
    {
        $params = [
            'using' => $by->getMechanism(),
            'value' => $by->getValue(),
            ':id' => $this->id,
        ];
        $raw_elements = $this->executor->execute(
            DriverCommand::FIND_CHILD_ELEMENTS,
            $params
        );

        $elements = [];
        foreach ($raw_elements as $raw_element) {
            $elements[] = $this->newElement($raw_element['ELEMENT']);
        }

        return $elements;
    }
170563
public function toWebDriver(): array
    {
        $webDriver = parent::toWebDriver();
        $webDriver += [
            'template_type' => 'airline_update',
            'intro_message' => $this->introMessage,
            'update_type' => $this->updateType,
            'pnr_number' => $this->pnrNumber,
            'update_flight_info' => $this->updateFlightInfo,
        ];

        return $webDriver;
    }
525060
public function getWebViewChildren($excludeUnpublished = false)
    {
        $webViewChildren = [];
        foreach ($this->children as $child) {
            if (!$child instanceof BusinessTemplate) {
                $notPublished = $child->getStatus() != PageStatus::PUBLISHED;
                $scheduledDateNotReached = $child->getStatus() == PageStatus::SCHEDULED && $child->getPublishedAt() > new \DateTime();

                if ($excludeUnpublished && ($notPublished || $scheduledDateNotReached)) {
                    continue;
                }

                $webViewChildren[] = $child;
            }
        }

        return $webViewChildren;
    }
29372
public function activeElement()
    {
        $response = $this->driver->execute(DriverCommand::GET_ACTIVE_ELEMENT, []);
        $method = new RemoteExecuteMethod($this->driver);

        return new RemoteWebElement($method, $response['ELEMENT']);
    }
298504
public static function convertElement($element, RemoteWebDriver $driver)
    {
        if ($element instanceof RemoteWebElement) {
            return new self($element, $driver);
        }

        return $element;
    }
295962
public function clickAndHold(WebDriverElement $element = null)
    {
        $this->action->addAction(
            new WebDriverClickAndHoldAction($this->mouse, $element)
        );

        return $this;
    }
1206062
public function toBeSelected()
    {
        $this->wait()->until(WebDriverExpectedCondition::elementToBeSelected($this->elementFinder->getSearchCriteria()));

        return $this;
    }
1094375
public function findElement(WebDriverBy $by)
    {
        $params = ['using' => $by->getMechanism(), 'value' => $by->getValue()];
        $raw_element = $this->execute(
            DriverCommand::FIND_ELEMENT,
            $params
        );

        return $this->newElement($raw_element['ELEMENT']);
    }
614169
public function getPageRelations()
    {
        $em = \Database::connection()->getEntityManager();
        $r = $em->getRepository('Concrete\Core\Entity\Page\Relation\SiblingRelation');
        $relation = $r->findOneBy(['cID' => $this->getCollectionID()]);
        $relations = array();
        if (is_object($relation)) {
            $allRelations = $r->findBy(['mpRelationID' => $relation->getPageRelationID()]);
            foreach($allRelations as $relation) {
                if ($relation->getPageID() != $this->getCollectionID() && $relation->getPageObject()->getSiteTreeObject() instanceof SiteTree) {
                    $relations[] = $relation;
                }
            }
        }
        return $relations;
    }
353100
public function getElementalRelations()
    {
        $hasOnes = $this->owner->hasOne();

        if (!$hasOnes) {
            return false;
        }

        $elementalAreaRelations = [];

        foreach ($hasOnes as $hasOneName => $hasOneClass) {
            if ($hasOneName === 'Parent' || $hasOneName === 'ParentID') {
                continue;
            }

            if ($hasOneClass == ElementalArea::class || is_subclass_of($hasOneClass, ElementalArea::class)) {
                $elementalAreaRelations[] = $hasOneName;
            }
        }

        return $elementalAreaRelations;
    }
739634
public T findElement(SearchContext context, By by) {
        return FirstElementBy.getWebElement(by, context);
    }
1044029
public function release(WebDriverElement $element = null)
    {
        $this->action->addAction(
            new WebDriverButtonReleaseAction($this->mouse, $element)
        );

        return $this;
    }
983483
public boolean isElementPresent(final By by) {
		try {
			driver.findElement(by);
		} catch (Exception e) {
			return false;
		}
		return true;
	}
292623
public function toWebDriver(): array
    {
        $webDriver = parent::toWebDriver();
        $webDriver += [
            'type' => 'airline_boardingpass',
            'intro_message' => $this->introMessage,
            'boarding_pass' => $this->boardingPass,
        ];

        return $webDriver;
    }
509269
public function equals(WebDriverElement $other)
    {
        try {
            return $this->element->equals($other);
        } catch (WebDriverException $exception) {
            $this->dispatchOnException($exception);
            throw $exception;
        }
    }
1371296
public function sendKeys(WebDriverElement $element = null, $keys = null)
    {
        $this->action->addAction(
            new WebDriverSendKeysAction(
                $this->keyboard,
                $this->mouse,
                $element,
                $keys
            )
        );

        return $this;
    }
869720
public function findDrivers(ContainerBuilder $container, array $activeDrivers, array $driverConfigs)
    {
        $driverConfigs = $this->removeUnusedDrivers($activeDrivers, $driverConfigs);
        $this->createDrivers($activeDrivers);
        $configTree = $this->configureDrivers();
        $driverConfigs = $this->processDriverConfiguration($configTree, $driverConfigs);
        $this->loadDrivers($container, $driverConfigs);

        return $this->drivers;
    }