Unit test for webview

Hi,
I’m building an application where I log in via a webview.
To log in I use an external Html page which returns a token via querystring which I then use in my application
Everything works correctly for me.
Now I would like to create Unit Tests, but it is the first time for me.
Is it possible to create tests for the webview, going to write in the two fields of the html form and submit?
You can give me some suggestions, I’m doing some research but what I find about Unit Tests is not in my case, or maybe I’m wrong to look.
Thanks