I want to write a reusable function/method which I can use to check whether a given WebElement is before/after another WebElement
The signature should look like follows:
public boolean isAfter(WebElement first, WebElement second)//returns true if the second is after first else false
Does the Selenium have an API that can allow achieving the scenario? Note that my teammates would be using this function in their respective projects. So my function wouldn't know how HTML in actual looks like to take any other path.