com.codeborne.selenide.Selectors [src]
The class contains some By selectors to locate elements by text or attributes (that may be missed in standard Selenium WebDriver API):
byText- search element by exact textwithText- search element by contained text (substring)byTitle- search by attribute "title"byValue- search by attribute "value"by(attributeName, attributeValue)- search by attribute's name and valuebyXpathetc.
// Examples:
$(byText("Login")).shouldBe(visible));
$(By.xpath("//div[text()='Login']")).shouldBe(visible); // any org.openqa.selenium.By.* selector can be used
$(byXpath("//div[text()='Login']")).shouldBe(visible); // or any its alternative from Selectors classPreviouscom.codeborne.selenide.CollectionCondition [src]Nextcom.codeborne.selenide.ElementsCollection [src]
Last updated
Was this helpful?