Using web and API testing together?

Is this possible? I’m testing a website, but want to use API at the same time so I can set an HTTP header that’s needed for authentication.

Any suggestions would be most welcome.

Thanks from down under!

Yes. Use either or both WS.whatever(), WebUI.whatever().

Thanks for that! I’ve been trying, without luck so far, and was concerned it might not be possible. So with this news, I’ll keep going!

You can show us your code and error messages.

My quick guess is that you forgot writing import statements.