Class AppiumUserAgentFilter
java.lang.Object
io.appium.java_client.internal.filters.AppiumUserAgentFilter
- All Implemented Interfaces:
Function<org.openqa.selenium.remote.http.HttpHandler,,org.openqa.selenium.remote.http.HttpHandler> org.openqa.selenium.remote.http.Filter
Manage Appium Client configurations.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.remote.http.HttpHandlerapply(org.openqa.selenium.remote.http.HttpHandler next) static StringbuildUserAgent(@Nullable String userAgent) Returns the User Agent.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openqa.selenium.remote.http.Filter
andFinally, andFinally, andThen
-
Field Details
-
VERSION_KEY
- See Also:
-
USER_AGENT
A default User Agent name for Appium Java client. e.g. appium/8.2.0 (selenium/4.5.0 (java mac))
-
-
Constructor Details
-
AppiumUserAgentFilter
public AppiumUserAgentFilter()
-
-
Method Details
-
buildUserAgent
Returns the User Agent. If the given UA already hasUSER_AGENT_PREFIX, it returns the UA. IF the given UA does not haveUSER_AGENT_PREFIX, it returns UA with the Appium prefix.- Parameters:
userAgent- the User Agent in the request headers.- Returns:
- the User Agent for the request
-
apply
public org.openqa.selenium.remote.http.HttpHandler apply(org.openqa.selenium.remote.http.HttpHandler next)
-