Returns parent element of current element.
551429
def parent
      assert_exists

      e = @element.parent

      if e.kind_of?(Nokogiri::XML::Element)
        WatirNokogiri.element_class_for(e.node_name.downcase).new(@parent, :element => e)
      end
    end
730286
def get_element_tree(parent_to_parse):
    

    if isinstance(parent_to_parse, ElementTree):
        return parent_to_parse

    element = get_element(parent_to_parse)

    return ElementTree() if element is None else ElementTree(element)
1322187
def element(cls, name, parent=None, interleave=None, occur=0):
        """"""
        node = cls("element", parent, interleave=interleave)
        node.attr["name"] = name
        node.occur = occur
        return node
1277326
def get_element_tail(parent_to_parse, element_path=None, default_value=u''):
    

    parent_element = get_element(parent_to_parse, element_path)

    if parent_element is None:
        return default_value

    if parent_element.tail:
        return parent_element.tail.strip() or default_value

    return default_value
124184
def get_node_parent_class(node):
    """"""

    while node.parent:  # pragma no branch
        if isinstance(node, ClassDef):
            return node

        node = node.parent
1373890
def get_parent(parent):
    """"""
    if isinstance(parent, Interface):
        return parent.id
    elif isinstance(parent, int):
        return parent
    else:
        raise TypeError(
            "parent must be an Interface or int, not %s" % (
                type(parent).__name__))
767756
def select_by_selector(self, selector):
    """"""
    option = find_element_by_jquery(world.browser, selector)
    selectors = find_parents_by_jquery(world.browser, selector)
    if not selectors:
        raise AssertionError("No parent element found for the option.")
    selector = selectors[0]
    selector.click()
    sleep(0.3)
    option.click()
    if not option.is_selected():
        raise AssertionError(
            "Option should have become selected after clicking it.")
1320913
def get_parent(self):
        """"""

        parent_iter = self.model.iter_parent(self.iter)
        if parent_iter:
            return TreeModelRow(self.model, parent_iter)
362677
def get_toplevel_parent(self, treeitem):
        """"""
        tv = self.treeview
        toplevel_items = tv.get_children()

        item = treeitem
        while not (item in toplevel_items):
            item = tv.parent(item)

        return item
184470
function () {
			if (this.settings.parentElement === false)
				return this.createErrorMessage("No parent element set!");
			// This is the container in
			// which the bar resides
			this.progressBar = $("<progress>").attr({
				"id": "progress-bar",
				"value": 0,
				"max": 100
			}).appendTo(this.settings.parentElement);
			this.progressLabel = $("<div>").attr({
				"class": "progress-bar-label"
			}).html("0%").appendTo(this.settings.parentElement);
			var div = $("<div>").html(this.settings.name).appendTo(this.settings.parentElement);
		}
679478
function() {
            var element = this._element;
            while (element.parentNode) {
                element = element.parentNode;
                if (element.$widget) {
                    return element.$widget;
                }
            }
            return null;
        }
678111
def parent(self):
        
        parent_impl_node = self.adapter.get_node_parent(self.impl_node)
        return self.adapter.wrap_node(
            parent_impl_node, self.adapter.impl_document, self.adapter)
96662
function(element) {
			var result = 0;
			var parent = element.parentNode;
			if (parent) {
				var node = parent.firstElementChild;
				while (node) {
					if (node === element) {
						break;
					} else {
						node = node.nextElementSibling;
						result++;
					}
				}
			}
			return result;
		}
830566
def parent(self, index):
        """"""
        if not index.isValid():
            return QtCore.QModelIndex()
        p = index.internalPointer()
        if p is self._conf:
            return QtCore.QModelIndex()
        pp = p.parent
        pk = p.name
        row = (pp.scalars + pp.sections).index(pk)
        return self.createIndex(row, 0, pp)
939222
function(sel) {
      if (!this.length) {
        return this;
      }
      var el = this[0];
      return u(array.filter.call(el.parentNode.children, function(child) {
        return sel ? child !== el && u(child).is(sel) : child !== el;
      }));
    }
691109
function (element) {
    var currentNode = element.parentNode
    while (currentNode) {
      if (currentNode.tagName === 'HTML') {
        return true
      }
      if (currentNode.nodeType === 11) {
        return false
      }
      currentNode = currentNode.parentNode
    }
    return false
  }
399804
function(selector) {
        var el = this.el.querySelector(selector);
        if (el && el.parentElement !== this.el) {
            el = null;
        }
        return el;
    }