Exemplo n.º 1
0
 public void readonly() {
   String x = selenWebElement.getAttribute("readonly");
   if (x == null) {
     Assertion.test(expect, false, "readonly");
   } else if (x.equals("true")) {
     Assertion.test(expect, true, "readonly");
   }
 }
Exemplo n.º 2
0
 public void haveAttr(String attrName) {
   try {
     selenWebElement.getAttribute(attrName);
     Assertion.test(expect, true, "Test for Attribute availability");
   } catch (Exception e) {
     Assertion.test(expect, false, "Test for Attribute availability");
   }
 }
Exemplo n.º 3
0
 public void disabled() {
   String x = selenWebElement.getAttribute("disabled");
   if (x == null) {
     Assertion.test(expect, false, "disabled");
   } else if (x.equals("true")) {
     Assertion.test(expect, true, "disabled");
   }
 }
Exemplo n.º 4
0
 public void haveAttrVal(String attrName, String attrValue, boolean caseSensitive) {
   String attibValue = selenWebElement.getAttribute(attrName);
   if (!caseSensitive) {
     Assertion.test(
         expect, attrValue.toLowerCase(), attibValue.toLowerCase(), "Have Attribute value");
   } else {
     Assertion.test(expect, attrValue, attibValue, "Have Attribute value");
   }
 }
Exemplo n.º 5
0
 public void haveClass(String className) {
   String actualClassName = selenWebElement.getAttribute("class");
   Assertion.test(expect, actualClassName, className, "Test for Class Name matching");
 }
Exemplo n.º 6
0
 public void selected() {
   boolean selected = selenWebElement.isSelected();
   Assertion.test(
       expect, selected, "Selected > Having Value : " + selenWebElement.getAttribute("value"));
 }