Get element Id from webdriver

@return int
@throws WebDriver_Exception
13628
public function getElementId()
    {
        if ($this->elementId === null) {
            $param = WebDriver_Util::parseLocator($this->locator);
            $commandUri = (null === $this->parent) ? 'element' : "element/{$this->parent->getElementId()}/element";
            $command = $this->driver->factoryCommand($commandUri, WebDriver_Command::METHOD_POST, $param);
            try {
                $result = $this->driver->curl($command);
            } catch (WebDriver_Exception $e) {
                $parentText = (null === $this->parent) ? '' : " (parent: {$this->parent->getLocator()})";
                $e->setMessage("Element not found: {$this->locator}{$parentText}  with error: {$e->getMessage()}");
                throw $e;
            }
            if (!isset($result['value']['ELEMENT'])) {
                $parentText = (null === $this->parent) ? '' : " (parent: {$this->parent->getLocator()})";
                throw new WebDriver_Exception("Element not found: {$this->locator}{$parentText}");
            }
            $this->elementId = $result['value']['ELEMENT'];
        }
        return $this->elementId;
    }
356721
protected function getEditHtmlSelect()
    {
        /** @var AdminBaseHelper $linkedHelper */
        $linkedHelper = $this->getSettings('HELPER');
        $inputSize = (int) $this->getSettings('INPUT_SIZE');
        $windowWidth = (int) $this->getSettings('WINDOW_WIDTH');
        $windowHeight = (int) $this->getSettings('WINDOW_HEIGHT');

        $name = 'FIELDS';
        $key = $this->getCode();

        $entityData = $this->getOrmElementData();

        if (!empty($entityData)) {
            $elementId = $entityData[$linkedHelper::pk()];
            $elementName = $entityData[$this->getSettings('TITLE_FIELD_NAME')] ?
                $entityData[$this->getSettings('TITLE_FIELD_NAME')] :
                Loc::getMessage('IBLOCK_ELEMENT_NOT_FOUND');
        } else {
            $elementId = '';
        }

        $popupUrl = $linkedHelper::getUrl(array_merge(
            array(
                'popup' => 'Y',
                'eltitle' => $this->getSettings('TITLE_FIELD_NAME'),
                'n' => $name,
                'k' => $key
            ),
            $this->getSettings('ADDITIONAL_URL_PARAMS')
        ));

        return '<input name="' . $this->getEditInputName() . '"
                     id="' . $name . '[' . $key . ']"
                     value="' . $elementId . '"
                     size="' . $inputSize . '"
                     type="text">' .
        '<input type="button"
                    value="..." onClick="jsUtils.OpenWindow(\''. $popupUrl . '\', ' . $windowWidth . ', '
        . $windowHeight . ');">' . '&nbsp;<span id="sp_' . md5($name) . '_' . $key . '" >' .
        static::prepareToOutput($elementName)
        . '</span>';
    }
124659
public function getId()
    {
        $id = $this->props['attribs']['id'];
        $sepChar = '_'; // character to join prefix and id
        $repChar = '_'; // replace \W with this char
        if (!$id && $this->props['attribs']['name']) {
            $id = \preg_replace('/\W/', $repChar, $this->props['attribs']['name']);
            $id = \preg_replace('/'.$repChar.'+/', $repChar, $id);
            $id = \trim($id, $repChar);
            if ($id && $this->props['idPrefix']) {
                $prefix = $this->props['idPrefix'];
                if (\preg_match('/[a-z]$/i', $prefix)) {
                    $prefix = $prefix.$sepChar;
                }
                $id = $prefix.$id;
            }
            if ($id) {
                $this->props['attribs']['id'] = $id;
            }
        }
        return $id;
    }
473733
public function location()
    {
        $result = $this->sendCommand('element/:id/location', WebDriver_Command::METHOD_GET);
        $value = $result['value'];
        return ['x' => $value['x'], 'y' => $value['y']];
    }
581184
public function getId()
    {
        return sprintf(
          '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
          mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff),
          mt_rand(0, 0x0fff) | 0x4000,
          mt_rand(0, 0x3fff) | 0x8000,
          mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
        );
    }
229439
public function getElements() {

        $elements = array();
        foreach ($this->modules as $module) {
            if (!$this->trusted && !$module->safe) continue;
            foreach ($module->info as $name => $v) {
                if (isset($elements[$name])) continue;
                $elements[$name] = $this->getElement($name);
            }
        }

        // remove dud elements, this happens when an element that
        // appeared to be safe actually wasn't
        foreach ($elements as $n => $v) {
            if ($v === false) unset($elements[$n]);
        }

        return $elements;

    }
1180969
public function getUserId() {
    if (array_key_exists(self::USER_ATTR, $this->payload)) {
      return $this->payload[self::USER_ATTR];
    }
    throw new Exception("No user_id in token");
  }
386045
public function getElementId()
    {
        $id = $this->getAttribute('elementId');
        if (null === $id && null !== $this->element) {
            $id = $this->elementId = $this->element->id;
        }

        return $id;
    }
482420
public String getId() {
		if(id == null) {
			synchronized(lock) {
				if(id == null) {
					if(page != null) {
						Map<String,Element> elementsById = page.getElementsById();
						// Generate the ID now
						String template = getElementIdTemplate();
						if(template == null) {
							throw new IllegalStateException("null from getElementIdTemplate");
						}
						StringBuilder possId = Element.generateIdPrefix(template, getDefaultIdPrefix());
						int possIdLen = possId.length();
						// Find an unused identifier
						for(int i=1; i<=Integer.MAX_VALUE; i++) {
							if(i == Integer.MAX_VALUE) throw new IllegalStateException("ID not generated");
							if(i>1) possId.append('-').append(i);
							String newId = possId.toString();
							if(
								elementsById == null
								|| !elementsById.containsKey(newId)
							) {
								setId(newId, true);
								break;
							}
							// Reset for next element number to check
							possId.setLength(possIdLen);
						}
					}
				}
			}
		}
		return id;
	}
495560
public function getId() {
    $str = "[".$this->combineOperator."] ".$this->type.".".$this->attribute.
            " ".$this->operator.(is_array($this->value) ? sizeof($this->value) : "");
    return $str;
  }
354387
public function getContentId() {
		if (!$this->id) {
			throw new Exception("Null content identifier; content must be written before retrieving id");
		}
		return $this->getSourceIdentifier() . ContentService::SEPARATOR . $this->id;
	}
245816
public function getId($autoGenerate = true) {
    	
        if ($this->_id !== null) {
            return $this->_id;
        } else if ($autoGenerate) {
            return $this->_id = 'egw' . self::$_counter++;
        } else {
	        return ''; // why getId can sometimes return nothing ? because it is used in the jquery selector, so null is not an acceptable value 
        }
    }
947616
public function getAnchor()
    {
        $linkedElement = $this->LinkedElement();

        if ($linkedElement && $linkedElement->exists()) {
            return $linkedElement->getAnchor();
        }

        return 'e' . $this->ID;
    }
731955
public function getDialogId()
    {
        $segment = $this->findSegment('HNHBK');

        if (null === $segment) {
            throw new \Exception('Could not find element HNHBK. Invalid response?');
        }

        return $this->getSegmentIndex(4, $segment);
    }
121640
protected function getElementsArrayText()
    {
        $elements = array();
        foreach ($this->elements as $element) {
            $elementId            = $element->getItem()
                                            ->getId();
            $elements[$elementId] = $element->getControl()
                                            ->getId();
        }
        return Builder::getArray($elements, true);
    }
1131939
public function getId()
    {
        return (strpos($this->__id, "[]") !== false) ? str_replace("[]", "", $this->__id) : $this->__id;
    }
319447
public function getDriver(): string
    {
        // Extract driver name from current config
        $driver = $this->getConfig('driver');

        try {
            if (!\is_string($driver)) {
                throw new Exception('Wrong type of "driver" item in config, must be a string');
            }

            if (!\in_array($driver, self::ALLOWED_DRIVERS, false)) {
                $allowed = implode(',', self::ALLOWED_DRIVERS);
                throw new Exception("Driver \"$driver\" is not in allowed list [" . $allowed . ']');
            }
        } catch (Exception $e) {
            // __constructor
        }

        return __NAMESPACE__ . '\\Drivers\\' . ucfirst(strtolower($driver));
    }