BrowserTab.find_element_by_xpath

def find_element_by_xpath(
self,
xpath: str
) -> WebElement

In the active browser, find element by the given XPath.

Parameters:
โ€ƒxpath[Required]: str
โ€ƒโ€ƒ the XPath of the element to find.

Returns:
โ€ƒWebElement object.

Example:


from clicknium import clicknium as cc

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

# find element by XPath
webelement = chrome_tab.find_element_by_xpath("//*[@id=\"sb_form_q\"]")
webelement.highlight()

Previousfind_elementNextfind_element_by_css_selector

What are your feelings
Updated on 29 August 2023