public void ShortAndLongPress() { var touchActions = new FlutterTouchActions().Tap(TapControl).LongPress(TapControl); FlutterDriver.Perform(touchActions); FlutterDriver.GetText(FlutterBy.ValueKey("tapCounter")).Should().Be("11", because: "because a tap and long press will increase the counter by 11 (1 + 10)"); }
public void NavigateToTextTestPage() { FlutterDriver.Click(FlutterBy.Text("Navigate to Taps Test Page")); FlutterDriver.WaitFor(FlutterBy.Text("Taps Page")); FlutterDriver.GetText(FlutterBy.ValueKey("tapCounter")).Should().Be("0", because: "the counter is initially 0"); }
public void Tap() { var touchActions = new FlutterTouchActions().Tap(TapControl); FlutterDriver.Perform(touchActions); FlutterDriver.GetText(FlutterBy.ValueKey("tapCounter")).Should().Be("1", because: "because a short tap will increase the counter by 1"); }
private void AssertCounterIs(string value, string because) { var result = FlutterDriver.GetText(FlutterBy.ValueKey("counter")); result.Should().Be(value, because); }