WaitFor Actions
waitForAlertPresent
Description: This function will wait for alert to be present
ObjectName | Action | Input | Condition | Reference |
---|---|---|---|---|
Mobile | waitForAlertPresent |
waitForAppElementToBeVisible
Description: This function will wait for element to be visible
ObjectName | Action | Input | Condition | Reference |
---|---|---|---|---|
mobileObject | waitForAppElementToBeVisible |
PageName |
waitForElementToBeInVisible
Description: This function will wait for element to be invisible
ObjectName | Action | Input | Condition | Reference |
---|---|---|---|---|
mobileObject | waitForElementToBeInVisible |
PageName |
waitForElementToBeTapable
Description: This function will wait for element to be tapable
ObjectName | Action | Input | Condition | Reference |
---|---|---|---|---|
mobileObject | waitForElementToBeTapable |
PageName |
waitForElementToBeSelected
Description: This function will wait for element to be selected
ObjectName | Action | Input | Condition | Reference |
---|---|---|---|---|
mobileObject | waitForElementToBeSelected |
PageName |
waitForElementToContainText
Description: This function will wait for element to contain text
ObjectName | Action | Input | Condition | Reference |
---|---|---|---|---|
mobileObject | waitForElementToContainText |
PageName |
@Action(object = ObjectType.APP, desc = "Wait for element: [<Object>] to contain text [<Data>]", condition = InputType.OPTIONAL, input = InputType.YES)
public void waitForElementToContainText() {
waitForElement(WaitType.TEXT_CONTAINS, "'"
+ this.ObjectName + "' Element contained the text: "
+ Data + " in stipulated Time");
}
waitForElementToContainValue
Description: This function will wait for element to contain value
ObjectName | Action | Input | Condition | Reference |
---|---|---|---|---|
mobileObject | waitForElementToContainValue |
PageName |
@Action(object = ObjectType.APP, desc = "Wait for [<Object>] element to contain value: [<Data>]", condition = InputType.OPTIONAL, input = InputType.YES)
public void waitForElementToContainValue() {
waitForElement(WaitType.VALUE_CONTAINS, "'"
+ this.ObjectName + "' Element contained the value: "
+ Data + " in stipulated Time");
}
waitForElementSelectionToBeTrue
Description: This function will wait for element to be selected
ObjectName | Action | Input | Condition | Reference |
---|---|---|---|---|
mobileObject | waitForElementSelectionToBeTrue |
PageName |
waitForElementSelectionToBeFalse
Description: This function will wait for element to be deselected
ObjectName | Action | Input | Condition | Reference |
---|---|---|---|---|
mobileObject | waitForElementSelectionToBeFalse |
PageName |
waitForTitleToBe
Description: This function will wait for page's title to match value given in Input column
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
Mobile | waitForTitleToBe |
@Data | << Hardcoded Input | ||
Mobile | waitForTitleToBe |
DatasheetName:ColumnName | << Input from Datasheet | ||
Mobile | waitForTitleToBe |
%variableName% | <<Input from variable |
waitForTitleToContain
Description: This function will wait for page's title to contain value given in Input column
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
Mobile | waitForTitleToContain |
@Data | << Hardcoded Input | ||
Mobile | waitForTitleToContain |
DatasheetName:ColumnName | << Input from Datasheet | ||
Mobile | waitForTitleToContain |
%variableName% | <<Input from variable |
waitForElementToBePresent
Description: This function will wait for element to be present
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
mobileObject | waitForElementToBePresent |
PageName |
@Action(object = ObjectType.APP, desc = "Wait for the element [<Object>] to be present", condition = InputType.OPTIONAL)
public void waitForElementToBePresent() {
MObject.setWaitTime(getWaitTime());
try {
Element = mObject.findElement(ObjectName, Reference);
MObject.resetWaitTime();
if (Element != null) {
Report.updateTestLog(Action, "'" + this.ObjectName
+ "' Element Present in the stipulated time", Status.PASS);
} else {
throw new ElementException(ElementException.ExceptionType.Element_Not_Found, ObjectName);
}
} catch (Exception ex) {
Logger.getLogger(this.getClass().getName()).log(Level.OFF, null, ex);
throw new ForcedException(Action,
ex.getMessage());
}
}
waitForFrameAndSwitch
Description: This function will wait for frame to be available and switch to it
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
mobileObject | waitForFrameAndSwitch |
@Data | PageName | << Hardcoded Input | |
mobileObject | waitForFrameAndSwitch |
DatasheetName:ColumnName | PageName | << Input from Datasheet | |
mobileObject | waitForFrameAndSwitch |
%variableName% | PageName | <<Input from variable |
@Action(object = ObjectType.APP, desc = "Wait for Frame To Be Available and Switch to it", input = InputType.OPTIONAL,
condition = InputType.OPTIONAL)
public void waitForFrameAndSwitch() {
if (Element != null) {
waitFor(WaitType.FRAME_EL, "Switched to Frame By Object '"
+ ObjectName + "' in stipulated Time");
} else if (Data != null) {
if (Data.matches("[0-9]+")) {
waitFor(WaitType.FRAME_IND, "Switched to Frame By Index '"
+ Data + "' in stipulated Time");
} else {
waitFor(WaitType.FRAME_STR, "Switched to Frame By Value '"
+ Data + "' in stipulated Time");
}
}
}