Skip to content

Commit

Permalink
Merge pull request #530 from Cognifide/remove-timeouts-limitation
Browse files Browse the repository at this point in the history
Remove timeouts limitation
  • Loading branch information
tMaxx authored Aug 6, 2020
2 parents 670d3b8 + db1bcaa commit d352832
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ All notable changes to AET will be documented in this file.
- [PR-567](https://github.com/Cognifide/aet/pull/567) Added missing tooltips in the report - "Previous url" and "Next url" ([#566](https://github.com/Cognifide/aet/issues/566))
- [PR-563](https://github.com/Cognifide/aet/pull/563) Fixed bug with tooltips for "Re-run" buttons. ([#476](https://github.com/Cognifide/aet/issues/476))
- [PR-522](https://github.com/Cognifide/aet/pull/522) Improve performance of generating /configs/list. ([#519](https://github.com/Cognifide/aet/issues/519))
- [PR-530](https://github.com/Cognifide/aet/pull/530) Remove max timeouts limitation for login and WebElements wait ([#99](https://github.com/Cognifide/aet/issues/99))
- [PR-554](https://github.com/Cognifide/aet/pull/554) Fix race condition under non-native bash environments ([#551](https://github.com/Cognifide/aet/issues/551))


## Version 3.3.0

- [PR-479](https://github.com/Cognifide/aet/pull/479) Added Secure and HttpOnly flags for cookies. ([#477](https://github.com/Cognifide/aet/issues/477))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ abstract public class WebElementsLocatorParams {

protected static final String EXCLUDE_ELEMENT_PARAM = "exclude-elements";

private static final long TIMEOUT_SECONDS_MAX_VALUE = 15L;

private static final long TIMEOUT_SECONDS_DEFAULT_VALUE = 1L;

private By locator;
Expand Down Expand Up @@ -75,9 +73,6 @@ private void initializeTimeOutParam(String timeoutString) throws ParametersExcep
.convert(Long.valueOf(timeoutString), TimeUnit.MILLISECONDS);
if (timeoutInSeconds < 0) {
throw new ParametersException("'timeout' parameter value should be greater or equal zero.");
} else if (TIMEOUT_SECONDS_MAX_VALUE < timeoutInSeconds) {
throw new ParametersException("'timeout' parameter value can't be greater than "
+ Long.toString(TIMEOUT_SECONDS_MAX_VALUE) + " seconds.");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class LoginModifierConfig {

private static final String FORCE_LOGIN = "force-login";

private static final String DEFAULT_CHECK_TIMEOUT_PARAM = "1000";
private static final String DEFAULT_CHECK_TIMEOUT_PARAM = "5000";

private static final String RETRIAL_NUMBER_PARAM = "retrial-number";

Expand Down Expand Up @@ -98,8 +98,6 @@ public LoginModifierConfig(Map<String, String> params) throws ParametersExceptio
.toInt(getParameter(params, RETRIAL_NUMBER_PARAM, DEFAULT_RETRIAL_NUMBER));

ParametersValidator.checkNotBlank(loginPage, "`login-page` parameter is mandatory");
ParametersValidator.checkRange(delayBeforeLoginCheckOrReattempt, 0, 10000,
"Timeout duration should be greater than 0 and less than 10 seconds");
ParametersValidator
.checkRange(retrialNumber, 1, Integer.MAX_VALUE, "Retrial number has to be at least 1");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,7 @@ public void setParameters_whenInvalidXpathParamIsProvided_thenExceptionIsThrown(
setupParams(PARAM_TIMEOUT_VALUE, "", null);
tested.setParameters(params);
}


@Test(expected = ParametersException.class)
public void setParameters_whenTooBgTimeoutParamIsProvided_thenExceptionIsThrown()
throws ParametersException {
setupParams("300000", PARAM_XPATH_VALUE, null);
tested.setParameters(params);
}


@Test(expected = ParametersException.class)
public void setParameters_whenNoParamsIsProvided_thenExceptionIsThrown()
throws ParametersException {
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/main/wiki/ClickModifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Module name: **click**
| --------- | ------------- | ----------- | --------- |
| `xpath` | | xpath of the element to be clicked | xpath or css |
| `css` | | css selector of the element to be clicked | xpath or css |
| `timeout` | 1000ms | The timeout for the element to appear, in milliseconds. The max value of this parameter is 15000 milliseconds (15 seconds). | no (default will be used) |
| `timeout` | 1000ms | The timeout for the element to appear, in milliseconds. | no (default will be used) |

##### Example Usage

Expand Down
2 changes: 1 addition & 1 deletion documentation/src/main/wiki/HideModifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Module name: **hide**
| --------- | ----- | ----------- | --------- |
| `xpath` | xpath_to_element | Xpath to element(s) to hide | xpath or css |
| `css` | css_selector_to_element | css selector to element(s) to hide | xpath or css |
| `timeout` | 1000ms | The timeout for the element to appear, in milliseconds. The max value of this parameter is 15000 milliseconds (15 seconds). | no (default will be used) |
| `timeout` | 1000ms | The timeout for the element to appear, in milliseconds. | no (default will be used) |
| `leaveBlankSpace` | boolean | Defines if element(s) should be invisible (effect as using `display=none`) or should be not displayed (effect as using `visibility=hidden`). When set to `true`, blank and transparent space is left in place of the hidden element, otherwise, element is completely removed from the view. When not defined, hide modifier behaves as if `leaveBlankSpace` property was set to `true`. | no |

##### Example Usage
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/main/wiki/ReplaceTextModifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Module name: **replaceText**
| `attributeName` | default: "innerHTML" | attribute of selected element to be set, e.g. 'href' or 'value'; attribute value or inner HTML will be replaced/set to 'value' | no |
| `xpath` | xpath_to_element | Xpath of element(s)| xpath or css |
| `css` | css_selector_to_element | css selector of element(s) | xpath or css |
| `timeout` | 1000ms | The timeout to wait for the element to be present, in milliseconds. The max value of this parameter is 15000 milliseconds (15 seconds). | no (default will be used) |
| `timeout` | 1000ms | The timeout to wait for the element to be present, in milliseconds. | no (default will be used) |

##### Example Usage

Expand Down
2 changes: 1 addition & 1 deletion documentation/src/main/wiki/ScreenCollector.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Module name: **screen**
| `xpath` | xpath_to_element | Xpath to element(s) | optional (either xpath or css) |
| `css` | css_selector_to_element | css selector to element(s)| optional (either xpath or css) |
| `exclude-elements` | css_selector_to_element | Elements found with that selector will be ignored by layout comparator (they won't affect its results) but will be rendered on the report as captured. | no |
| `timeout` | 1000ms | The timeout for the element to appear, in milliseconds. The max value of this parameter is 15000 milliseconds (15 seconds). | no (default will be used) this parameter applies only in conjunction with xpath or css param |
| `timeout` | 1000ms | The timeout for the element to appear, in milliseconds. | no (default will be used) this parameter applies only in conjunction with xpath or css param |

##### Example Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Module name: **wait-for-element-to-be-visible**
| --------- | ------------- | ----------- | --------- |
| `xpath` | | an xpath locator which identifies the web element to be found within a web page | xpath or css |
| `css` | | a css selector which identifies the web element to be found within a web page | xpath or css |
| `timeout` | 1000ms | a value of timeout for the web element to appear, in milliseconds. The max value of this parameter is 15000 milliseconds (15 seconds). | no (the default value will be used) |
| `timeout` | 1000ms | a value of timeout for the web element to appear, in milliseconds. | no (the default value will be used) |

##### Example Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Module name: **wait-for-element-to-be-visible**
| --------- | ------------- | ----------- | --------- |
| `xpath` | | an xpath locator which identifies the image to be found and loaded within a web page | xpath or css |
| `css` | | a css selector which identifies the image to be found and loaded within a web page | xpath or css |
| `timeout` | 1000ms | a value of timeout for the image to load, in milliseconds. The max value of this parameter is 15000 milliseconds (15 seconds). | no (the default will be used) |
| `timeout` | 1000ms | a value of timeout for the image to load, in milliseconds. | no (the default will be used) |

##### Example Usage

Expand Down

0 comments on commit d352832

Please sign in to comment.