0

I've been using Robotium to test on several open source phonegap applications. Recently when I test for Wikipedia and TeamToy-Pocket. I find that Robotium would click on the webElement but will not redirect the screen (while manually click the webElement will do). I've tried two ways of clicking:

solo.clickOnWebElement(By.id(id), 1, true);

and

solo.enterTextInWebElement(By.id(id), text);

I observe a click on the designated webElement (using "show pointer location" in developer option), but the expected page transit doesn't happen.

Here's the logcat log when I click the element by Robotium:

08-08 12:15:46.044: I/click(16334): Lactarius indigo: uptime: 5003094 realtime: 8755078
08-08 12:15:46.234: D/webview(16334): blockWebkitViewMessage= false
08-08 12:15:56.165: D/DroidGap(16334): Paused the application!
08-08 12:15:56.165: D/CordovaWebView(16334): Handle the pause
08-08 12:15:56.165: D/CordovaWebView(16334): >>> loadUrlNow()
08-08 12:15:56.165: D/WebView(16334): loadUrlImpl: called
08-08 12:15:56.385: W/IInputConnectionWrapper(16334): showStatusIcon on inactive InputConnection
08-08 12:15:56.885: D/DroidGap(16334): onDestroy()
08-08 12:15:56.885: D/CordovaWebView(16334): >>> loadUrlNow()
08-08 12:15:56.885: D/WebView(16334): loadUrlImpl: called
08-08 12:15:56.885: D/CordovaWebView(16334): >>> loadUrlNow()
08-08 12:15:56.885: D/WebView(16334): loadUrlImpl: called  

Then I turned to MonkeyRunner hoping to cope this problem, I use following statement to click a hyperlink

device.touch(347,322,MonkeyDevice.DOWN_AND_UP)

and still the same thing, a click was exercised on designated area, but no page transition.

Here's the log when I click the point by MonkeyRunner:

08-08 12:18:32.652: V/webview(16574):  singleCursorHandlerTouchEvent -getEditableSupport  FASLE 

I'm using Galaxy Sumsung S3, and my SDK tool version is 22.0.5. Any suggestion is welcomed.

P.S I also tried monkey using

adb shell monkey -p org.wikipedia -v 500 --throttle 500

It seems can click on some link and trigger the redirection to the designated page. Don't know why is that. Thanks!

Wei Yang
  • 895
  • 3
  • 15
  • 26

0 Answers0