Add userAgent support
Fix test