Skip to content

Commit

Permalink
4914_cardRefacButtons
Browse files Browse the repository at this point in the history
  • Loading branch information
MayaElf committed Dec 22, 2023
1 parent 4275f4f commit 5256725
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static com.epam.jdi.light.angular.elements.enums.CardImageSize.SMALL;

import com.epam.jdi.light.angular.asserts.CardAssert;
import com.epam.jdi.light.angular.elements.common.Button;
import com.epam.jdi.light.angular.elements.enums.CardImageSize;
import com.epam.jdi.light.common.JDIAction;
import com.epam.jdi.light.elements.base.UIBaseElement;
Expand Down Expand Up @@ -73,13 +74,13 @@ public String getCardText() {
}

@JDIAction("Get button with text '{text}'")
public UIElement getButtonByText(String text) {
return this.getButtons().get(text);
public Button getButtonByText(String text) {
return new Button().setCore(Button.class, this.getButtons().get(text));
}

@JDIAction("Get button with number '{number}'")
public UIElement getButtonByNumber(int number) {
return this.getButtons().get(number);
public Button getButtonByNumber(int number) {
return new Button().setCore(Button.class, this.getButtons().get(number));
}

@JDIAction("Get if {name} has align end actions")
Expand Down

0 comments on commit 5256725

Please sign in to comment.