Skip to content

Commit

Permalink
Implement WrapsElement by Select element wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
valfirst committed Nov 5, 2018
1 parent ad4d1c7 commit e9834aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion java/client/src/org/openqa/selenium/support/ui/Select.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.WrapsElement;

import java.util.List;
import java.util.StringTokenizer;
Expand All @@ -28,7 +29,7 @@
/**
* Models a SELECT tag, providing helper methods to select and deselect options.
*/
public class Select implements ISelect {
public class Select implements ISelect, WrapsElement {

private final WebElement element;
private final boolean isMulti;
Expand All @@ -55,6 +56,11 @@ public Select(WebElement element) {
isMulti = (value != null && !"false".equals(value));
}

@Override
public WebElement getWrappedElement() {
return element;
}

/**
* @return Whether this select element support selecting multiple options at the same time? This
* is done by checking the value of the "multiple" attribute.
Expand Down

0 comments on commit e9834aa

Please sign in to comment.