1 package vid.automation.test.infra;
3 import org.openqa.selenium.By;
4 import org.openqa.selenium.NoSuchElementException;
5 import org.openqa.selenium.WebElement;
6 import vid.automation.test.Constants;
9 public static boolean byId(String id) {
10 return Get.byId(id) != null;
13 public static boolean byTestId(String testId) {
14 return Get.byTestId(testId) != null;
17 public static boolean byClass(String className) {
18 return Get.byClass(className) != null;
21 public static boolean byClassAndText(String className, String text) {
22 return Get.byClassAndText(className, text) != null;
25 public static boolean byCssSelectorAndText(String css, String text) {
26 return Get.byCssSelectorAndText(css, text) != null;
29 public static boolean modal() {
31 return Get.byCssSelector(Constants.Modals.modalClass) != null;
32 } catch (NoSuchElementException exception) {
37 public static boolean tagNameInAnotherElement(WebElement parent, String tagName) {
39 return parent.findElement(By.tagName(tagName)) != null;
40 } catch (NoSuchElementException exception) {