Fragments should abstract page logic. So, you don't wan't it to have methods like writeUsername, writPassword, submitForm(). This is subject to change in future.

You want to have it login(username, password) method.