Notice: La función _load_textdomain_just_in_time fue llamada de forma incorrecta. Translation loading for the astra domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Visitá Depuración en WordPress para más información. (Este mensaje se agregó en la versión 6.7.0.) in /home/autoc0de/public_html/wp-includes/functions.php on line 6114

Warning: Cannot modify header information - headers already sent by (output started at /home/autoc0de/public_html/wp-includes/functions.php:6114) in /home/autoc0de/public_html/wp-content/plugins/betterdocs-pro/public/class-betterdocs-pro-public.php on line 324
auto_verifyTextMatchInList – Autoc0de: Automation Framework

auto_verifyTextMatchInList

    public void auto_verifyTextMatchInList(String parentXPath, List<String> textList) {
        for (String text : textList) {
            String completeXPath = String.format(parentXPath, text);
            auto_waitForElementsVisibilities(completeXPath);
            List<ElementHandle> elements = page.locator(completeXPath).elementHandles();
            softAssertions.assertThat(elements.stream().anyMatch(x -> {
                String innerText = x.textContent();
                System.out.println("Comparing: " + innerText + " with " + text);
                return innerText != null && innerText.contains(text);
            })).as("Element not displayed: " + text).isTrue();
        }
        softAssertions.assertAll();
    }
What are your feelings
Scroll al inicio