Skip to content

Commit 856da77

Browse files
committed
ReactDateTimePicker: use refindWhenNeeded in order to prevent issues with stale elements
1 parent 5bc931d commit 856da77

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/org/labkey/test/components/react/ReactDateTimePicker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ protected ElementCache newElementCache()
201201
protected class ElementCache extends Component<?>.ElementCache
202202
{
203203
WebElement inputContainer = Locator.tagWithClass("div", "react-datepicker__input-container")
204-
.findElement(this);
205-
public Input input = new Input(Locator.tag("input").findWhenNeeded(inputContainer), getDriver());
204+
.refindWhenNeeded(this);
205+
public Input input = new Input(Locator.tag("input").refindWhenNeeded(inputContainer), getDriver());
206206

207207
WebElement popup = Locator.xpath(".").followingSibling("div").withClass("react-datepicker__tab-loop")
208208
.refindWhenNeeded(this);

0 commit comments

Comments
 (0)