You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,group
My robotium version is:robotium-solo-4.3.jar,android os version is:4.1.2
I can use solo.clickOnButton() and other solo method to operate elements in my test project,but when I act in a WebView,I call solo.clickOnWebElement(By.id(***)),it throws NullPointerException,trace is below,pls give me a glance,thanks!
java.lang.NullPointerException
at java.io.Reader.(Reader.java:64)
at java.io.InputStreamReader.(InputStreamReader.java:122)
at java.io.InputStreamReader.(InputStreamReader.java:59)
at com.jayway.android.robotium.solo.WebUtils.getJavaScriptAsString(WebUtils.java:315)
at com.jayway.android.robotium.solo.WebUtils.prepareForStartOfJavascriptExecution(WebUtils.java:142)
at com.jayway.android.robotium.solo.WebUtils.executeJavaScriptFunction(WebUtils.java:248)
at com.jayway.android.robotium.solo.WebUtils.executeJavaScript(WebUtils.java:211)
at com.jayway.android.robotium.solo.WebUtils.getCurrentWebElements(WebUtils.java:102)
at com.jayway.android.robotium.solo.Searcher.searchForWebElement(Searcher.java:239)
at com.jayway.android.robotium.solo.Waiter.waitForWebElement(Waiter.java:332)
at com.jayway.android.robotium.solo.Clicker.clickOnWebElement(Clicker.java:318)
at com.jayway.android.robotium.solo.Solo.clickOnWebElement(Solo.java:868)
at com.android.test.MyAccount.RegisterAccountsList.test1_listShow(RegisterAccountsList.java:82)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1584)
I downloaded newest version of robotium published on Sep 9,2013,and cleaned the test project,but it can not take effect,java.lang.NullPointerException still throws out,can you give me some other advise about this question?Maybe test project should set special setting to suport javascript execution?
thank you very much!
I run my test on real device,android os version of the device is 4.1.2,but my develop env. android sdk version is android 4.2.2,will it be conflict?Thanks your kindness help!
Hi, we had the same problem. We just added " *.js " to the compiler ressource patterns in the Preferences (in this case in IntelliJ. And then the error didn't occur anymore. Maybe this could help you.
Cheers.
From zhangpin...@gmail.com on September 26, 2013 18:00:43
hi,group
My robotium version is:robotium-solo-4.3.jar,android os version is:4.1.2
I can use solo.clickOnButton() and other solo method to operate elements in my test project,but when I act in a WebView,I call solo.clickOnWebElement(By.id(***)),it throws NullPointerException,trace is below,pls give me a glance,thanks!
java.lang.NullPointerException
at java.io.Reader.(Reader.java:64)
at java.io.InputStreamReader.(InputStreamReader.java:122)
at java.io.InputStreamReader.(InputStreamReader.java:59)
at com.jayway.android.robotium.solo.WebUtils.getJavaScriptAsString(WebUtils.java:315)
at com.jayway.android.robotium.solo.WebUtils.prepareForStartOfJavascriptExecution(WebUtils.java:142)
at com.jayway.android.robotium.solo.WebUtils.executeJavaScriptFunction(WebUtils.java:248)
at com.jayway.android.robotium.solo.WebUtils.executeJavaScript(WebUtils.java:211)
at com.jayway.android.robotium.solo.WebUtils.getCurrentWebElements(WebUtils.java:102)
at com.jayway.android.robotium.solo.Searcher.searchForWebElement(Searcher.java:239)
at com.jayway.android.robotium.solo.Waiter.waitForWebElement(Waiter.java:332)
at com.jayway.android.robotium.solo.Clicker.clickOnWebElement(Clicker.java:318)
at com.jayway.android.robotium.solo.Solo.clickOnWebElement(Solo.java:868)
at com.android.test.MyAccount.RegisterAccountsList.test1_listShow(RegisterAccountsList.java:82)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1584)
Original issue: http://code.google.com/p/robotium/issues/detail?id=523
The text was updated successfully, but these errors were encountered: