RobotiumTech/robotium

Android Studio running JS java.lang.NullPointerException

Opened this issue · 0 comments

As the title says, running in AndroidStudio2.2

Code:
Assert.assertTrue("OpenWebSuccess", solo.waitForWebElement(By.id("s_lg_img")));

java.lang.NullPointerException: lock == null
at java.io.Reader.(Reader.java:64)
at java.io.InputStreamReader.(InputStreamReader.java:122)
at java.io.InputStreamReader.(InputStreamReader.java:59)
at com.robotium.solo.WebUtils.getJavaScriptAsString(WebUtils.java:351)
at com.robotium.solo.WebUtils.prepareForStartOfJavascriptExecution(WebUtils.java:160)
at com.robotium.solo.WebUtils.executeJavaScriptFunction(WebUtils.java:274)
at com.robotium.solo.WebUtils.executeJavaScript(WebUtils.java:236)
at com.robotium.solo.WebUtils.getWebElements(WebUtils.java:109)
at com.robotium.solo.Searcher.searchForWebElement(Searcher.java:238)
at com.robotium.solo.Waiter.waitForWebElement(Waiter.java:498)
at com.robotium.solo.Solo.waitForWebElement(Solo.java:672)

running in eclipse is OK,but in AndroidStudio is NullPointerException