Page.get_element_from_selector#

Page.get_element_from_selector(selector, do_copy=False)[source]#

Gets an element from its CSS selector.

Parameters:
  • selector (str) –

  • do_copy (bool, default = False) – If True, the element will be copied.

Returns:

element – If the element was found, an Element object will be returned. Otherwise None will be returned.

Return type:

Element