-
Block header: The green input connector triggers the block to start executing. The green output connector triggers when the web element has been successfully found. You can rename the block by double-clicking the header text and typing a new title.
-
Select Web Element: Contains the locator for the web element to be found. Capture a locator by right-clicking and selecting Capture new web element. You can edit it via Edit web element, or clear it via Clear web element.
See the many different Learning Center video examples of how this works.
-
Found element: Outputs the found web element in the browser window. You can reuse it as a Source element in other blocks to narrow down later searches (for example, searching for tr/td inside a table).
-
Not found: Triggers if the web element is not found before the timeout behavior completes. This is typically used to branch the execution flow or explicitly fail a case by linking it to a Fail block.
-
Position found: Outputs the browser canvas position where the element was found as X, Y coordinates. The top-left corner of the browser canvas is 0, 0. Elements that are not visible (for example hidden by CSS) typically report 0, 0. Use the expander to work with X and Y separately.
-
Area found: Outputs the browser canvas position and size of the found element as X, Y, Width, Height, starting from the upper-leftmost pixel. The top-left corner is 0, 0. Use the expander to work with position/size and nested sub-properties separately.
-
Attributes: Outputs all attributes on the found element as key–value pairs (including standard HTML attributes like class, style, href, and custom data-xxx attributes). If you only need a specific attribute, Get Web Attribute can be a better fit.
-
CSS values: Outputs values from the element’s HTML style information (for example color, font-family, font-size, width/height, borders). If no style values are present, this output is blank.
-
Visible: Returns True if the found web element is visible.
-
Tag name: Outputs the tag name of the found element (for example div, tr, button, input).
-
Source element: Limits the search to only occur inside the provided source element. This is useful when you first find a container (like a table) and then search inside it.
-
Browser window: Specifies which browser window to search in. Multiple browser windows are not supported by Selenium Grid or external cloud providers such as Sauce Labs and BrowserStack.
-
Use occurred: Selects which occurrence to use if multiple matching elements are found. Select All to iterate through all occurrences.
-
Count: Outputs the total number of found web elements that match the locator.
-
Default timeout: Controls whether the block uses the default timeout from the flow settings or a custom timeout value.
-
Timeout (sec): Sets the maximum time spent searching for the web element before the block gives up and triggers Not found. This field is used when Default timeout is not selected.
Note: All cases have a global timeout configured in the Settings panel. This is unrelated to the timeout of a single building block. However, a running case will automatically be cancelled if it runs for longer than the global timeout.
-
Scroll to find: When set to a value other than None, the block scrolls while searching for the element. This is useful in scrollable pages where elements load asynchronously (for example infinite scroll).
-
Max repeats: The maximum number of times to perform a scroll before giving up.
-
Amount: How much scrolling is performed on each repeat.
-
Delay (sec): The delay in seconds between each scroll amount.
-
Require valid imgs: When enabled, locators targeting images (img tags) are additionally validated to ensure the image loads correctly. Leapwork does this by sending an HTTP request to the image source and validating that a 200 response is returned.
-
Scroll into view: When enabled, any found web element is automatically scrolled into view.
-
Await not found: When enabled, the block assumes the element is currently present and waits until it can no longer be found before proceeding. This can be useful when waiting for a “Loading…” message to disappear.
-
Await DOM change: Delays searching until there have been no changes to the page’s DOM for a specified period (for example, three seconds). Regardless of this checkbox, the search proceeds after waiting a maximum of 30 seconds.
-
Await Requests: Delays searching until there have been no active XHR requests for a specified period (for example, three seconds). This is useful for apps that update heavily in the background (including Microsoft Dynamics 365 and Salesforce). Regardless of this checkbox, the search proceeds after waiting a maximum of 30 seconds.