Extended TextBoxBasePO by getValue() method

This commit is contained in:
Dennis Aulenbacher committed 2020-08-28 13:10:21 +02:00
1 parent 98c8e6b531
commit 6e37166d70
2 files changed
+11 -1

No files matched your search

@@ -27,7 +27,7 @@ public class StringListEditorCompositePO extends PageArea {
public String getValueEntryName(){
TextBoxPO textBoxPO = new TextBoxPO(this.driver, valueTextBox);
String text = textBoxPO.getWebElement().getAttribute("value");
String text = textBoxPO.getValue();
return text;
}
}
@@ -53,5 +53,15 @@ public abstract class TextBoxBasePO extends AbstractInputPO {
public String getText() {
return getWebElement().getText();
}
/**
* Gets the text contained in the underlying {@link WebElement}s "Value" attribute.
* This might be necessary for input elements that do not maintain their contained text in the "innerText" attribute, that is returned by #WebElement#getText()
* @return the contained text
*
*/
public String getValue() {
return getWebElement().getAttribute("Value");
}
}