Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
Added markAsUsed() to PageObject and added it to relevant methods of …
Browse files Browse the repository at this point in the history
…GenericTextField and MultiSelect
  • Loading branch information
nicopaul committed Jan 11, 2017
1 parent a7e5b22 commit dbab6ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ public void pressEnter() {

@Override
public void execute(PageObject pageObject) {
pageObject.markAsUsed();
pageObject.getWebElement().sendKeys(Keys.ENTER);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public void execute(PageObject pageObject) {
* @since 1.2
*/
public void deselectAll() {
this.markAsUsed();
getSelect().deselectAll();
}

Expand All @@ -111,6 +112,7 @@ public void deselectAll() {
* @since 1.2
*/
public void deselectByTexts(final String... texts) {
this.markAsUsed();
for (String text : texts) {
getSelect().deselectByVisibleText(text);
}
Expand All @@ -125,6 +127,7 @@ public void deselectByTexts(final String... texts) {
* @since 1.2
*/
public void deselectByValues(final String... values) {
this.markAsUsed();
for (String value : values) {
getSelect().deselectByValue(value);
}
Expand All @@ -139,6 +142,7 @@ public void deselectByValues(final String... values) {
* @since 1.2
*/
public void deselectByIndices(final Integer... indices) {
this.markAsUsed();
for (Integer index : indices) {
getSelect().deselectByIndex(index);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ protected final void markAsRead() {
Marker.markAsRead(this);
}

protected final void markAsUsed() {
Marker.markAsUsed(this);
}

/**
* Creates a new instance for the given {@linkplain PageObject page object}
* class using the {@linkplain Browser browser's} creation mechanism. This
Expand Down

0 comments on commit dbab6ea

Please sign in to comment.