Test if two element IDs refer to the same DOM element.

@param WebDriverElement $other
@return bool
509269
public function equals(WebDriverElement $other)
    {
        try {
            return $this->element->equals($other);
        } catch (WebDriverException $exception) {
            $this->dispatchOnException($exception);
            throw $exception;
        }
    }
799258
public boolean equalId(Element otherElement) {
		if (getElementId() == null || otherElement.getElementId() == null) {
			return false;
		}
		return getElementId().equalsIgnoreCase(otherElement.getElementId());
	}
1053036
protected function matches($other)
    {
        foreach ($this->constraints as $key => $constraint) {
            if (! array_key_exists($key, $other)) {
                return false;
            }

            if (! $constraint->evaluate($other[$key], '', true)) {
                return false;
            }
        }

        if ($this->isStrict and array_diff_key($other, $this->constraints)) {
            return false;
        }

        return true;
    }
659647
public function hasElement($name)
    {
        foreach($this->elements as $element){
            if($element->getName() == $name) {
                return true;
            }
        }

        return false;
    }
830562
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if ($other instanceof IntegerNode) {
            return $this->getDenominator() == 1 && $this->getNumerator() == $other->getValue();
        }
        if (!($other instanceof RationalNode)) {
            return false;
        }

        return $this->getNumerator() == $other->getNumerator() && $this->getDenominator() == $other->getDenominator();
    }
217338
public boolean equivalent(Element otherElement, boolean logging) {
		if (eventable.getElement().equals(otherElement)) {
			if (logging) {
				LOGGER.info("Element equal");
			}
			return true;
		}

		if (eventable.getElement().equalAttributes(otherElement)) {
			if (logging) {
				LOGGER.info("Element attributes equal");
			}
			return true;
		}

		if (eventable.getElement().equalId(otherElement)) {
			if (logging) {
				LOGGER.info("Element ID equal");
			}
			return true;
		}

		if (!eventable.getElement().getText().equals("")
				&& eventable.getElement().equalText(otherElement)) {

			if (logging) {
				LOGGER.info("Element text equal");
			}

			return true;
		}

		return false;
	}
1244483
public function equals(DateTimeBase $other) : bool
    {
        $dateTime      = $this->dateTime;
        $otherDateTime = $other->dateTime;

        return $dateTime == $otherDateTime
                && $dateTime->getTimezone()->getName() === $otherDateTime->getTimezone()->getName();
    }
253435
public function equals( $other ) {
		return $other instanceof self
			&& $this->username == $other->getUsername()
			&& $this->password == $other->getPassword()
			&& $this->domain == $other->getDomain();
	}
492393
public function equals(RDN $other): bool
    {
        // if attribute count doesn't match
        if (count($this) != count($other)) {
            return false;
        }
        $attribs1 = $this->_attribs;
        $attribs2 = $other->_attribs;
        // if there's multiple attributes, sort using SET OF rules
        if (count($attribs1) > 1) {
            $attribs1 = self::fromASN1($this->toASN1())->_attribs;
            $attribs2 = self::fromASN1($other->toASN1())->_attribs;
        }
        for ($i = count($attribs1) - 1; $i >= 0; --$i) {
            $tv1 = $attribs1[$i];
            $tv2 = $attribs2[$i];
            if (!$tv1->equals($tv2)) {
                return false;
            }
        }
        return true;
    }
1080633
public function lt($other)
    {
        if (!($other instanceof self)) {
            $other = new BigInt($other);
        }
        return ($this->compare($other) < 0);
    }
551018
public function equals($other) {
		if ($other instanceof UrlPort) {
			return ($this->isEmpty() && $other->isEmpty()) || ($this->port === $other->port);
		}
		if (is_int($other)) {
			return $this->port === $other;
		}
		if (is_null($other)) {
			return is_null($this->port);
		}
		return false;
	}
170761
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if (!($other instanceof PostfixOperatorNode)) {
            return false;
        }

        return $this->getOperator() == $other->getOperator();
    }
988311
public function isChecked($xpath) {
    $this->findElement($xpath, 1);
    $javascript = $this->javascriptTemplateRender("is_checked.js.twig", array("xpath" => $xpath));
    $checked = $this->browser->evaluate($javascript);

    if ($checked === null) {
      throw new DriverException("Can not check when the element is not checkbox or radio");
    }

    return $checked;
  }
339192
protected function matches($other): bool
    {
        if (is_array($other)) {
            $success = null;
            foreach ($other as $item) {
                $currentSuccess = $this->matchesSection($item);
                $success = ($success === null ? $currentSuccess : $success || $currentSuccess);
            }
            return !empty($success);
        } else {
            return $this->matchesSection($other);
        }
    }
295201
public function equals($other, $parts=['scheme', 'user', 'host', 'path'])
    {
        $other = $other instanceof UrlContract ? $other : new static($other);
        $parts = (array)$parts;

        foreach ($parts as $part) {
            if ($part == 'path') {
                continue;
            }
            if ($this->$part != $other->$part) {
                return false;
            }
        }

        if (!in_array('path', $parts)) {
            return true;
        }

        return $this->path->equals($other->path);
    }
1076263
public function equals(self $other) : bool
    {
        return
            $this->wrapped->y     == $other->wrapped->y &&
            $this->wrapped->m     == $other->wrapped->m &&
            $this->wrapped->d     == $other->wrapped->d &&
            $this->wrapped->h     == $other->wrapped->h &&
            $this->wrapped->i     == $other->wrapped->i &&
            $this->wrapped->s     == $other->wrapped->s &&
            $this->wrapped->days  == $other->wrapped->days &&
            $this->microseconds   == $other->microseconds;
    }
779397
public function isFullfilledBy(Index $other)
    {
        // allow the other index to be equally large only. It being larger is an option
        // but it creates a problem with scenarios of the kind PRIMARY KEY(foo,bar) UNIQUE(foo)
        if (count($other->getColumns()) !== count($this->getColumns())) {
            return false;
        }

        // Check if columns are the same, and even in the same order
        $sameColumns = $this->spansColumns($other->getColumns());

        if ($sameColumns) {
            if (! $this->samePartialIndex($other)) {
                return false;
            }

            if (! $this->hasSameColumnLengths($other)) {
                return false;
            }

            if (! $this->isUnique() && ! $this->isPrimary()) {
                // this is a special case: If the current key is neither primary or unique, any unique or
                // primary key will always have the same effect for the index and there cannot be any constraint
                // overlaps. This means a primary or unique index can always fulfill the requirements of just an
                // index that has no constraints.
                return true;
            }

            if ($other->isPrimary() !== $this->isPrimary()) {
                return false;
            }

            return $other->isUnique() === $this->isUnique();
        }

        return false;
    }