title: Flutter testing - forms
body: <p>I have tried testing in flutter with <strong>flutter_test</strong> and <strong>flutter_driver</strong>. Able to achieve UI testing with tap functions. But my requirement is to test forms end to end(i.e automatically fill forms). Facing issue with <strong>driver.enterText()</strong>, its not getting executed and the test cases stops executing from here.</p>
  
  <p>Below is the code that i have tried :</p>
  
  <pre><code>test('Going back to customers tab', () async {
        // First, tap the button.
        final customerTabFinder = find.text('Customers');
        await driver.waitFor(customerTabFinder);
        await driver.tap(customerTabFinder);
        await driver.getText(find.text("Customer"));
        await takeScreenshot(driver, 'screenshots/incremented1.png');
      });
  
      test("Adding customers", () async {
        final pressAddCustomerButton = find.byTooltip("Increment");
  
        await driver.waitFor(pressAddCustomerButton);
        await driver.tap(pressAddCustomerButton);
        print("Add customer page is opened");
      });
  
      test("Adding text in textfield", () async {
        await driver.tap(find.byValueKey("CustomerBusinessName"));
        await sleep(Duration(seconds: 5));
        await driver.enterText('Hello !');
  
        await driver.tap(find.byValueKey("CustomerPhoneNumber"));
        await driver.enterText('1234567890');
      });
  </code></pre>