dartintegration-testingflutter-webflutter-integration-test

Flutter integrtaion_test: How to integration_test hyperlink?


I am developing some intregration tests for my flutter-web application. wherein i wanted to automate the hyperlink. So is there a way to test the hyperlink or some tab switching mechanism possible in integration_test?


Solution

  • Yes, there is a way to achieve this, you can refer the url_launcher's integration_test package on GitHub. It has an elaborative example on testing for web and it covers both of your use cases.

    https://github.com/flutter/plugins/blob/master/packages/url_launcher/url_launcher_web/example/integration_test/url_launcher_web_test.dart