
com.infotel.seleniumrobot.grid.utils.GridStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of seleniumRobot-grid4 Show documentation
Show all versions of seleniumRobot-grid4 Show documentation
Selenium grid extension for mobile testing
The newest version!
package com.infotel.seleniumrobot.grid.utils;
public enum GridStatus {
ACTIVE ("active"),
INACTIVE ("inactive"),
UNKNOWN ("unknwon");
String[] gStatus;
GridStatus(final String... gridStatus) {
this.gStatus = gridStatus;
}
public static GridStatus fromString(String status) {
try {
return GridStatus.valueOf(status);
} catch (NullPointerException e) {
throw new IllegalArgumentException("Unrecognized null grid status");
} catch (IllegalArgumentException ex) {
for (GridStatus gridStatus : GridStatus.values()) {
for (String matcher : gridStatus.gStatus) {
if (status.equalsIgnoreCase(matcher)) {
return gridStatus;
}
}
}
throw new IllegalArgumentException("Unrecognized grid status: " + status);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy