public class ViewAdapter
extends java.lang.Object
Constructor and Description |
---|
ViewAdapter(java.lang.String className,
java.lang.Object view)
Constructs an adapter for any View to work with WebDriver.
|
Modifier and Type | Method and Description |
---|---|
void |
addJavascriptInterface(java.lang.Object obj,
java.lang.String interfaceName) |
android.graphics.Picture |
capturePicture() |
void |
clearCache(boolean includeDiskFiles) |
void |
clearFormData() |
void |
clearHistory() |
void |
clearView() |
void |
destroy() |
void |
dispatchKeyEvent(android.view.KeyEvent event) |
void |
dispatchTouchEvent(android.view.MotionEvent ev) |
void |
flingScroll(int vx,
int vy) |
float |
getScale() |
android.webkit.WebSettings |
getSettings() |
java.lang.String |
getTitle() |
java.lang.Object |
getUnderlyingView() |
java.lang.String |
getUrl() |
void |
goBack() |
void |
goForward() |
void |
loadUrl(java.lang.String url) |
void |
reload() |
void |
removeAllViews() |
boolean |
requestFocus(int direction) |
void |
scrollBy(int x,
int y) |
void |
setFocusable(boolean focusable) |
void |
setFocusableInTouchMode(boolean focusableInTouchMode) |
void |
setNetworkAvailable(boolean networkUp) |
void |
setOnFocusChangeListener(android.view.View.OnFocusChangeListener l) |
void |
setWebChromeClient(ChromeClientWrapper client) |
void |
setWebViewClient(ViewClientWrapper client) |
public ViewAdapter(java.lang.String className, java.lang.Object view)
className
- the fully qualified class name of the View. For instance:
For WebView use "android.webkit.WebView".view
- the view that will be used by the driver. The view must
fullfill those two criterion :
- the view must belong to Android's View hierarchy
- the view must implement the same methods as WebView's. If the view
is a WebView, this is always true.public void scrollBy(int x, int y)
public void flingScroll(int vx, int vy)
public void dispatchTouchEvent(android.view.MotionEvent ev)
public float getScale()
public void dispatchKeyEvent(android.view.KeyEvent event)
public java.lang.String getUrl()
public java.lang.String getTitle()
public android.graphics.Picture capturePicture()
public void goBack()
public void goForward()
public void loadUrl(java.lang.String url)
public void reload()
public void setNetworkAvailable(boolean networkUp)
public android.webkit.WebSettings getSettings()
public void setWebChromeClient(ChromeClientWrapper client)
public void setWebViewClient(ViewClientWrapper client)
public void setOnFocusChangeListener(android.view.View.OnFocusChangeListener l)
public void addJavascriptInterface(java.lang.Object obj, java.lang.String interfaceName)
public void clearCache(boolean includeDiskFiles)
public void clearFormData()
public void clearHistory()
public void clearView()
public boolean requestFocus(int direction)
public void setFocusable(boolean focusable)
public void setFocusableInTouchMode(boolean focusableInTouchMode)
public java.lang.Object getUnderlyingView()
public void removeAllViews()
public void destroy()