Skip to content

Commit

Permalink
Merge pull request telekom#443 from Yannie258/refactor/remove-depreca…
Browse files Browse the repository at this point in the history
…ted-method-AbstractPage

remove deprecated methode from AbstractPage
  • Loading branch information
martingrossmann authored Sep 23, 2024
2 parents 48526aa + 2b78e26 commit f944256
Showing 1 changed file with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
* Livecycle methods for {@link #checkUiElements(CheckRule)}:
* {@link #checkPagePreparation()}
* {@link #addCustomFieldActions}
* {@link #assertPageIsNotShown()} or {@link #assertPageIsNotShown()}
*
* {@link #checkPageErrorState(Throwable)}
* @see {https://martinfowler.com/bliki/PageObject.html}
* @author Peter Lehmann
Expand Down Expand Up @@ -95,21 +95,6 @@ protected UiElement createEmpty() {
protected UiElement createEmpty(Locator locator) {
return new EmptyUiElement(this, locator);
}

/**
* Calls the assertPageIsShown method.
*/
private void checkAdditional(CheckRule checkRule) {
switch (checkRule) {
case IS_NOT_PRESENT:
case IS_NOT_DISPLAYED:
assertPageIsNotShown();
break;
default:
assertPageIsShown();
}
}

/**
* Package private accessible by {@link PageFactory}
*/
Expand Down Expand Up @@ -148,7 +133,6 @@ private void pCheckPage(CheckRule checkRule) throws Throwable {
checkPagePreparation();
try {
checkAnnotatedFields(checkRule);
checkAdditional(checkRule);
} catch (Throwable throwable) {
// call page error state logic
checkPageErrorState(throwable);
Expand Down Expand Up @@ -254,13 +238,6 @@ private List<Class<? extends AbstractPage>> collectAllSuperClasses() {
/**
* Empty method to be overriden. Can perform some (additional) checks on page objects.
*/
@Deprecated
public void assertPageIsShown() {
}

@Deprecated
public void assertPageIsNotShown() {
}

@Override
abstract public WebDriver getWebDriver();
Expand Down

0 comments on commit f944256

Please sign in to comment.