file.pagefactory.json.ClassDetails Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of findbyfilewebelement Show documentation
Show all versions of findbyfilewebelement Show documentation
Storing Element Locators in excel, json and properties files
The newest version!
package file.pagefactory.json;
import java.util.List;
import com.google.gson.stream.MalformedJsonException;
public class ClassDetails {
private String className;
private List fieldBy;
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public List getFieldBy() {
return fieldBy;
}
public void setFieldBy(List fieldBy) {
this.fieldBy = fieldBy;
}
@Override
public String toString() {
return "ClassDetails [className=" + className + ", fieldBy=" + fieldBy + "]";
}
public static void checkValues(ClassDetails detail) throws MalformedJsonException {
if(detail.className == null || detail.className.length() == 0)
throw new MalformedJsonException("className attribute is missing or misspelled.");
if(detail.fieldBy == null || detail.fieldBy.size() == 0)
throw new MalformedJsonException("fieldBy attribute is missing or misspelled.");
}
}