How to automate a Flutter Application

2.5k Views Asked by At

I am working on a project in which I am using webview to open a website. I want the application to automatically fill data in the required fields and log in by reading the OTP and perform various actions depending on various events like people create automation using Selenium. I have seen some articles on flutter automation using flutter driver but they are mostly for widget tests and it's not properly clear to me.

Can anyone provide an insight on how can I properly implement this?

Thanks in advance.

1

There are 1 best solutions below

2
On

You can execute JavaScript in your WebView

Here is a tutorial

Once you can execute your javascript, you just have to get your input and fill it.

For example:

const inp = document.getElementById("your_input");
inp.value = "some text";