Skip to content

Instantly share code, notes, and snippets.

@borodicht
Created December 16, 2024 18:33
Show Gist options
  • Save borodicht/e7e06ea23aaf24569e5eeb44b08dd5c4 to your computer and use it in GitHub Desktop.
Save borodicht/e7e06ea23aaf24569e5eeb44b08dd5c4 to your computer and use it in GitHub Desktop.
package pages;
import com.codeborne.selenide.Condition;
import org.openqa.selenium.By;
import java.time.Duration;
import static com.codeborne.selenide.Selectors.byText;
import static com.codeborne.selenide.Selenide.*;
public class ProjectsPage {
public void openPage() {
open("projects");
}
public void waitTillOpened() {
$(byText("Create new project")).shouldBe(Condition.visible);
}
public void removeProject(String projectName) {
$(byText(projectName))
.ancestor("tr")
.find("button[aria-label='Open action menu']")
.click();
$("[data-testid=remove]").click();
$(byText("Delete project")).click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment