Package ai.devtools.utils
Class MatchUtils
java.lang.Object
ai.devtools.utils.MatchUtils
Static methods for matching bounding boxes to underlying Selenium elements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WebElementmatchBoundingBoxToSeleniumElement(com.google.gson.JsonObject boundingBox, SmartDriver driver) Matches a bounding box returned by the dev-tools.ai API to a selenium WebElement on the current page.
-
Constructor Details
-
MatchUtils
public MatchUtils()
-
-
Method Details
-
matchBoundingBoxToSeleniumElement
public static WebElement matchBoundingBoxToSeleniumElement(com.google.gson.JsonObject boundingBox, SmartDriver driver) Matches a bounding box returned by the dev-tools.ai API to a selenium WebElement on the current page.- Parameters:
boundingBox- The json representing the element returned by the dev-tools.ai API.driver- TheSmartDriverto use- Returns:
- The best-matching, underlying
WebElementwhich best fits the parameters specified byboudingBox
-