find

Contents

find#

Find and return specified element with given URL

asrch.commands._find.find_elements(url: str, locator: str, element: str, header: bool = False, proxy: str | None = None, log=True) str[source]#

Find elements based on given locator + element name The possible locators are: TAG_NAME, CLASS_NAME, ID, XPATH

Parameters:
  • url (str) – The URL of the web page.

  • element (str) – The element to return

  • proxy (Optional[str], optional) – Proxy to be used for the request, defaults to None.

  • header (bool, optional) – Flag indicating whether to include headers in the request, defaults to False.

Raises:
  • ValueError – If the URL is empty.

  • Exception – If there are issues with the request.

Returns:

The content of the web page.

Return type:

str