File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/test/java/com/flowingcode/vaadin/addons/xterm/integration Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2222import static org .hamcrest .Matchers .is ;
2323import static org .hamcrest .Matchers .not ;
2424import static org .junit .Assert .assertThat ;
25+ import com .vaadin .testbench .HasTestBenchCommandExecutor ;
2526import com .vaadin .testbench .TestBenchElement ;
2627import org .hamcrest .Description ;
2728import org .hamcrest .Matcher ;
@@ -64,8 +65,9 @@ public void componentWorks() {
6465 @ Test
6566 public void writeText () throws InterruptedException {
6667 TestBenchElement term = $ ("fc-xterm" ).first ();
67- WebElement input =
68- (WebElement ) getCommandExecutor ().executeScript ("return document.activeElement" );
68+
69+ WebElement input = (WebElement ) waitUntil (driver -> ((HasTestBenchCommandExecutor ) driver )
70+ .getCommandExecutor ().executeScript ("return arguments[0].terminal.textarea" , term ));
6971
7072 int y = cursorPosition (term ).y ;
7173
You can’t perform that action at this time.
0 commit comments