This is my test code to get value from Selenium WebElement.
import java.util.List;
import org.apache.commons.lang3.ObjectUtils.Null;
import org.openqa.se
You can using Javascript, code below will return an ArrayList of Map with tag name, id, href, class keys almost instantly:
ArrayList<Maps> list = (ArrayList) ((JavascriptExecutor) driver).executeScript("return [...document.querySelectorAll(\"*\")].map(e=>{return {tagName:(e.tagName==undefined?null:e.tagName),class:(e.className==undefined?null:e.className),id:(e.id==undefined?null:e.id),href:(e.href==undefined?null:e.href)}})");
All you need is to add js code to get location and size. For text you can use textContent.
Before execute the script be sure page is loaded.