🍺 Join Clicknium for quality support, growth opportunities, and a supportive community

child

def child(self, index: int)

Get child element with index.

Remarks:

  • The index starts from 0.

Parameters:
 index[Required]: int
   index specified, get the nth child

Returns:
 WebElement object if it is found, or None if not

Example:

from clicknium import clicknium as cc, locator, ui

chrome_tab = cc.chrome.open("https://bing.com")

# get web element
ele = chrome_tab.find_element(locator.chrome.bing.search_sb_form_q)

# get element's first child
first_child = ele.child[0]

PreviousWebElementNextfind_element

What are your feelings
Updated on 29 August 2023