BrowserTab.find_element_by_css_selector

def find_element_by_css_selector(
self,
css_selector: str
) -> WebElement

In active browser, find element by the given CSS selector.

Parameters:
โ€ƒcss_selector[Required]: str
โ€ƒโ€ƒ The CSS selector to find the element.

Returns:
โ€ƒWebElement object.

Example:


from clicknium import clicknium as cc

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

# find element by CSS selector
webelement = chrome_tab.find_element_by_css_selector("#sb_form_q")
webelement.highlight()

Previousfind_element_by_xpathNextfind_elements

What are your feelings
Updated on 29 August 2023