test

https://ru.selenide.org/quick-start.html

package org.example;

import org.junit.Test;
import org.openqa.selenium.By;

import static com.codeborne.selenide.Condition.text;
import static com.codeborne.selenide.Selenide.*;

import static com.codeborne.selenide.CollectionCondition.size;
//https://ru.selenide.org/quick-start.html
//поменялись внутренние теги сейчас нет #ires li.g то что нашёл тоже не хочет биться
public class GoogleTest {
    @Test
    public void userCanSearchKeywordWithGoogle() {
        open("http://google.com");
        $(By.name("q")).setValue("Selenide").pressEnter();
        $$("#res h3").shouldHave(size(10));
        $("#res h3.LC20lb").shouldHave(text("Selenide: concise UI Tests with Java"));
    }
}

pom.xml

    <!-- https://mvnrepository.com/artifact/com.codeborne/selenide -->
    <dependency>
        <groupId>com.codeborne</groupId>
        <artifactId>selenide</artifactId>
        <version>7.5.1</version>
    </dependency>

<!--    пример использования-->
<!--    https://ru.selenide.org/quick-start.html-->
<!--    https://github.com/selenide-examples/gmail/blob/main/test/org/selenide/examples/gmail/GmailTests.java-->

    <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>5.11.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>7.10.1</version>
        <scope>compile</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/junit/junit -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
        <scope>test</scope>
    </dependency>