zebrunner / carina-webdriver

Apache License 2.0
7 stars 10 forks source link

Performance audit of selenium/appium actions #148

Closed akamarouski closed 1 year ago

akamarouski commented 1 year ago

Investigate selenium/appium actions speed. For now on web mobile getText method from ExtendedWebElement, for example, takes ~5s. But if we try to get text from clean selenium WebElement, it takes ~600ms.

akamarouski commented 1 year ago

Done. During investigations we found that appium method from ExtendedElementLocator:

    private By getBy(By currentBy, SearchContext currentContent) {
        if (!ContentMappedBy.class.isAssignableFrom(currentBy.getClass())) {
            return currentBy;
        }

        return ContentMappedBy.class.cast(currentBy)
                .useContent(getCurrentContentType(currentContent));
    }

Takes a lot of time for web mobile, but it is useless, so it's usage was removed from this class