From 15cf7a879097ba8d0be19de289adb3600489a8d8 Mon Sep 17 00:00:00 2001 From: Joel Maher Date: Fri, 30 Dec 2011 15:57:34 -0500 Subject: [PATCH] Bug 711591 - make the robotium test driver a bit more driver like. r=ctalbert --- build/mobile/robocop/Assert.java.in | 53 +++++ .../mobile/robocop/FennecNativeAssert.java.in | 212 ++++++++++++++++++ build/mobile/robocop/Makefile.in | 20 +- mobile/android/base/tests/robocop.ini | 7 + .../android/base/tests/robocop_blank_01.html | 6 + .../android/base/tests/robocop_blank_02.html | 7 + .../android/base/tests/robocop_blank_03.html | 6 + .../android/base/tests/testAwesomebar.java.in | 13 +- .../android/base/tests/testBookmark.java.in | 13 +- mobile/android/base/tests/testLoad.java.in | 10 +- mobile/android/base/tests/testNewTab.java.in | 17 +- mobile/android/base/tests/testPan.java.in | 10 +- 12 files changed, 349 insertions(+), 25 deletions(-) create mode 100644 build/mobile/robocop/Assert.java.in create mode 100644 build/mobile/robocop/FennecNativeAssert.java.in create mode 100644 mobile/android/base/tests/robocop.ini create mode 100644 mobile/android/base/tests/robocop_blank_01.html create mode 100644 mobile/android/base/tests/robocop_blank_02.html create mode 100644 mobile/android/base/tests/robocop_blank_03.html diff --git a/build/mobile/robocop/Assert.java.in b/build/mobile/robocop/Assert.java.in new file mode 100644 index 000000000000..b0d3527b165e --- /dev/null +++ b/build/mobile/robocop/Assert.java.in @@ -0,0 +1,53 @@ +#filter substitution +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Firefox Mobile Test Framework. + * + * The Initial Developer of the Original Code is Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2011 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Trevor Fairey + * David Burns + * Joel Maher + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +package @ANDROID_PACKAGE_NAME@; + +public interface Assert { + void dumpLog(String message); + void setLogFile(String filename); + + void ok(boolean condition, String name, String diag); + void is(Object a, Object b, String name); + void isnot(Object a, Object b, String name); + void todo(boolean condition, String name, String diag); + void todo_is(Object a, Object b, String name); + void todo_isnot(Object a, Object b, String name); + void info(String name, String message); +} diff --git a/build/mobile/robocop/FennecNativeAssert.java.in b/build/mobile/robocop/FennecNativeAssert.java.in new file mode 100644 index 000000000000..f9d8b3a7f47b --- /dev/null +++ b/build/mobile/robocop/FennecNativeAssert.java.in @@ -0,0 +1,212 @@ +#filter substitution +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Firefox Mobile Test Framework. + * + * The Initial Developer of the Original Code is Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2011 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Trevor Fairey + * David Burns + * Joel Maher + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +package @ANDROID_PACKAGE_NAME@; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.HashMap; +import java.util.List; + +import java.lang.Class; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.lang.reflect.InvocationHandler; +import java.lang.Long; + +import android.app.Activity; +import android.util.Log; +import android.view.View; + +import org.json.*; + +import com.jayway.android.robotium.solo.Solo; + +public class FennecNativeAssert implements Assert { + // Map of IDs to element names. + private HashMap locators = null; + private String logFile = null; + + // Objects for reflexive access of fennec classes. + + private LinkedList testList = new LinkedList(); + + // If waiting for an event. + private boolean asleep = false; + + public FennecNativeAssert(){ + } + + // Write information to a logfile and logcat + public void dumpLog(String message) + { + File file = new File(logFile); + BufferedWriter bw = null; + + try { + bw = new BufferedWriter(new FileWriter(logFile, true)); + bw.write(message); + bw.newLine(); + } catch(IOException e) { + Log.e("Robocop", "exception with file writer on: " + logFile); + } finally { + try { + if (bw != null) { + bw.flush(); + bw.close(); + } + } catch (IOException ex) { + ex.printStackTrace(); + } + } + + Log.i("Robocop", message); + } + + // Set the filename used for dumpLog. + public void setLogFile(String filename) + { + logFile = filename; + } + + + class testInfo { + public boolean result; + public String name; + public String diag; + public boolean todo; + public testInfo(boolean r, String n, String d, boolean t) { + result = r; + name = n; + diag = d; + todo = t; + } + + } + + + private void _logResult(testInfo test, String passString, String failString) + { + boolean isError = true; + String resultString = failString; + if(test.result || test.todo){ + isError = false; + } + if(test.result) + { + resultString = passString; + } + String diag= test.name; + if(test.diag!=null) diag+= " - " + test.diag; + + String message = resultString + " | " + "ROBOCOP" + " | " + diag; + if(isError) { + if(logFile == null) + { + assert(false); + } + else { + dumpLog(message); + } + } + else { + dumpLog(message); + } + } + + public void ok(boolean condition, String name, String diag) { + testInfo test = new testInfo(condition, name, diag, false); + _logResult(test, "TEST-PASS", "TEST-UNEXPECTED-FAIL"); + testList.add(test); + } + + public void is(Object a, Object b, String name) { + boolean pass = a.equals(b); + String diag = "got " + a.toString() + ", expected " + b.toString(); + if(pass) { + diag = a.toString() + " should equal " + b.toString(); + } + ok(pass, name, diag); + } + + public void isnot(Object a, Object b, String name) { + boolean pass = !a.equals(b); + String diag = "didn't expect " + a.toString() + ", but got it"; + if(pass) { + diag = a.toString() + " should not equal " + b.toString(); + } + ok(pass, name, diag); + } + + public void todo(boolean condition, String name, String diag) { + testInfo test = new testInfo(condition, name, diag, true); + _logResult(test, "TEST-UNEXPECTED-PASS", "TEST-KNOWN-FAIL"); + testList.add(test); + } + + public void todo_is(Object a, Object b, String name) { + boolean pass = a.equals(b); + String diag = "got " + a.toString() + ", expected " + b.toString(); + if(pass) { + diag = a.toString() + " should equal " + b.toString(); + } + todo(pass, name, diag); + } + + public void todo_isnot(Object a, Object b, String name) { + boolean pass = !a.equals(b); + String diag = "didn't expect " + a.toString() + ", but got it"; + if(pass) { + diag = a.toString() + " should not equal " + b.toString(); + } + todo(pass, name, diag); + } + + public void info(String name, String message) { + testInfo test = new testInfo(true, name, message, false); + _logResult(test, "TEST-INFO", "INFO FAILED?"); + } +} diff --git a/build/mobile/robocop/Makefile.in b/build/mobile/robocop/Makefile.in index 8ea8256ef6b2..a31e6d2e2c4d 100644 --- a/build/mobile/robocop/Makefile.in +++ b/build/mobile/robocop/Makefile.in @@ -51,16 +51,25 @@ JAVAFILES = \ R.java \ _JAVA_HARNESS = \ + Actions.java \ + Assert.java \ Driver.java \ Element.java \ - Actions.java \ + FennecNativeActions.java \ + FennecNativeAssert.java \ + FennecNativeDriver.java \ FennecNativeElement.java \ RoboCopException.java \ - FennecNativeDriver.java \ - FennecNativeActions.java \ + $(NULL) _JAVA_TESTS = $(patsubst $(TESTPATH)/%.in,%,$(wildcard $(TESTPATH)/*.java.in)) +_TEST_FILES = \ + $(TESTPATH)/robocop_blank_01.html \ + $(TESTPATH)/robocop_blank_02.html \ + $(TESTPATH)/robocop_blank_03.html \ + $(NULL) + _ROBOCOP_TOOLS = \ $(TESTPATH)/robocop.ini \ parse_ids.py \ @@ -104,13 +113,16 @@ $(_ROBOCOP_TOOLS): cp $(TESTPATH)/robocop.ini robocop.ini cp $(srcdir)/parse_ids.txt parse_ids.txt +libs:: $(_TEST_FILES) + $(NSINSTALL) -D $(DEPTH)/_tests/testing/mochitest/tests/robocop + $(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/robocop/ + tools:: robocop.apk classes.dex: robocop.ap_ classes.dex: $(_ROBOCOP_TOOLS) classes.dex: $(_JAVA_HARNESS) classes.dex: $(_JAVA_TESTS) -classes.dex: $(TEST_FILES) $(NSINSTALL) -D classes $(JAVAC) $(JAVAC_FLAGS) -d classes $(JAVAFILES) $(_JAVA_HARNESS) $(addprefix $(DEPTH)/mobile/android/base/tests/,$(_JAVA_TESTS)) $(DX) --dex --output=$@ classes $(ROBOTIUM_PATH) diff --git a/mobile/android/base/tests/robocop.ini b/mobile/android/base/tests/robocop.ini new file mode 100644 index 000000000000..cd6f3d29855d --- /dev/null +++ b/mobile/android/base/tests/robocop.ini @@ -0,0 +1,7 @@ +[testAwesomebar] +[testBookmark] +[testLoad] +[testNewTab] + +# Used for Talos, please don't use in mochitest +#[testPan] diff --git a/mobile/android/base/tests/robocop_blank_01.html b/mobile/android/base/tests/robocop_blank_01.html new file mode 100644 index 000000000000..8fd14cc1bebd --- /dev/null +++ b/mobile/android/base/tests/robocop_blank_01.html @@ -0,0 +1,6 @@ + +Browser Blank Page 01 + +

Browser Blank Page 01

+ + diff --git a/mobile/android/base/tests/robocop_blank_02.html b/mobile/android/base/tests/robocop_blank_02.html new file mode 100644 index 000000000000..61d6b1f61acc --- /dev/null +++ b/mobile/android/base/tests/robocop_blank_02.html @@ -0,0 +1,7 @@ + +Browser Blank Page 02 + + +

Browser Blank Page 02

+ + diff --git a/mobile/android/base/tests/robocop_blank_03.html b/mobile/android/base/tests/robocop_blank_03.html new file mode 100644 index 000000000000..57b38163dd30 --- /dev/null +++ b/mobile/android/base/tests/robocop_blank_03.html @@ -0,0 +1,6 @@ + +Browser Blank Page 03 + +

Browser Blank Page 03

+ + diff --git a/mobile/android/base/tests/testAwesomebar.java.in b/mobile/android/base/tests/testAwesomebar.java.in index 08ec40cb7080..3b85e04f6c77 100644 --- a/mobile/android/base/tests/testAwesomebar.java.in +++ b/mobile/android/base/tests/testAwesomebar.java.in @@ -25,6 +25,7 @@ public class testAwesomebar extends ActivityInstrumentationTestCase2 { private Solo solo; private Activity activity; private Driver driver; + private Assert asserter; private Actions actions; private static Class launcherActivityClass; @@ -62,11 +63,13 @@ public class testAwesomebar extends ActivityInstrumentationTestCase2 { driver = new FennecNativeDriver(activity, solo); actions = new FennecNativeActions(activity, solo, getInstrumentation()); driver.setLogFile((String)config.get("logfile")); + + asserter = new FennecNativeAssert(); + asserter.setLogFile((String)config.get("logfile")); } public void testAwesomebar() { - // TODO: find a better way to not hardcode this url - String url = "http://mochi.test:8888/tests/robocop/robocop.html"; + String url = "http://mochi.test:8888/tests/robocop/robocop_blank_01.html"; actions.waitForGeckoEvent("Gecko:Ready"); Element awesomebar = driver.findElement("awesome_bar"); awesomebar.click(); @@ -74,11 +77,13 @@ public class testAwesomebar extends ActivityInstrumentationTestCase2 { Element urlbar = driver.findElement("awesomebar_text"); getInstrumentation().waitForIdleSync(); actions.sendKeys(url); - driver.is(urlbar.getText(), url, "Awesomebar URL Typed Properly"); + asserter.is(urlbar.getText(), url, "Awesomebar URL Typed Properly"); + actions.sendSpecialKey(Actions.SpecialKey.ENTER); //wait for screen to load actions.waitForGeckoEvent("DOMContentLoaded"); driver.setupScrollHandling(); + //Calculate where we should be dragging. int midX = driver.getGeckoLeft() + driver.getGeckoWidth()/2; int midY = driver.getGeckoTop() + driver.getGeckoHeight()/2; @@ -94,7 +99,7 @@ public class testAwesomebar extends ActivityInstrumentationTestCase2 { //Click the awesomebar again awesomebar.click(); getInstrumentation().waitForIdleSync(); - driver.is(urlbar.getText(), url, "Aweosmebar URL stayed the same"); + asserter.is(urlbar.getText(), url, "Awesomebar URL stayed the same"); } @Override diff --git a/mobile/android/base/tests/testBookmark.java.in b/mobile/android/base/tests/testBookmark.java.in index 33ee2e48e3f2..5e29106e5b93 100644 --- a/mobile/android/base/tests/testBookmark.java.in +++ b/mobile/android/base/tests/testBookmark.java.in @@ -25,6 +25,7 @@ public class testBookmark extends ActivityInstrumentationTestCase2 { private Solo solo; private Activity activity; private Driver driver; + private Assert asserter; private Actions actions; private static Class launcherActivityClass; @@ -62,11 +63,14 @@ public class testBookmark extends ActivityInstrumentationTestCase2 { driver = new FennecNativeDriver(activity, solo); actions = new FennecNativeActions(activity, solo, getInstrumentation()); driver.setLogFile((String)config.get("logfile")); + + asserter = new FennecNativeAssert(); + asserter.setLogFile((String)config.get("logfile")); } public void testBookmark(){ // TODO: find a better way to not hardcode this url - String url = "http://mochi.test:8888/tests/robocop/robocop.html"; + String url = "http://mochi.test:8888/tests/robocop/robocop_blank_02.html"; actions.waitForGeckoEvent("Gecko:Ready"); Element awesomebar = driver.findElement("awesome_bar"); @@ -75,7 +79,7 @@ public class testBookmark extends ActivityInstrumentationTestCase2 { Element urlbar = driver.findElement("awesomebar_text"); getInstrumentation().waitForIdleSync(); actions.sendKeys(url); - driver.is(urlbar.getText(), url, "Awesomebar url typed properly"); + asserter.is(urlbar.getText(), url, "Awesomebar url typed properly"); //Click the top item in the list. actions.sendSpecialKey(Actions.SpecialKey.DOWN); @@ -84,8 +88,7 @@ public class testBookmark extends ActivityInstrumentationTestCase2 { getInstrumentation().waitForIdleSync(); awesomebar.click(); - driver.is(urlbar.getText(), url, "Awesomebar URL still on"); - + asserter.is(urlbar.getText(), url, "Awesomebar URL still on"); //Click the Top item in the history list. getInstrumentation().waitForIdleSync(); @@ -100,7 +103,7 @@ public class testBookmark extends ActivityInstrumentationTestCase2 { getInstrumentation().waitForIdleSync(); awesomebar.click(); //Unfortunately, the item isn't constant so can't be tested. - //driver.is(url, urlbar.getText(),"Shouldn't this be the last url in the history?"); + //asserter.is(url, urlbar.getText(),"Shouldn't this be the last url in the history?"); } @Override diff --git a/mobile/android/base/tests/testLoad.java.in b/mobile/android/base/tests/testLoad.java.in index a18cdd663d53..8e4ef281423a 100644 --- a/mobile/android/base/tests/testLoad.java.in +++ b/mobile/android/base/tests/testLoad.java.in @@ -25,6 +25,7 @@ public class testLoad extends ActivityInstrumentationTestCase2 { private Solo solo; private Activity activity; private Driver driver; + private Assert asserter; private Actions actions; private static Class launcherActivityClass; @@ -62,11 +63,14 @@ public class testLoad extends ActivityInstrumentationTestCase2 { driver = new FennecNativeDriver(activity, solo); actions = new FennecNativeActions(activity, solo, getInstrumentation()); driver.setLogFile((String)config.get("logfile")); + + asserter = new FennecNativeAssert(); + asserter.setLogFile((String)config.get("logfile")); } public void testLoad(){ // TODO: find a better way to not hardcode this url - String url = "http://mochi.test:8888/tests/robocop/robocop.html"; + String url = "http://mochi.test:8888/tests/robocop/robocop_blank_03.html"; actions.waitForGeckoEvent("Gecko:Ready"); Element awesomebar = driver.findElement("awesome_bar"); @@ -76,7 +80,7 @@ public class testLoad extends ActivityInstrumentationTestCase2 { getInstrumentation().waitForIdleSync(); actions.sendKeys(url); getInstrumentation().waitForIdleSync(); - driver.is(urlbar.getText(), url, "Awesomebar URL Correct"); + asserter.is(urlbar.getText(), url, "Awesomebar URL Correct"); //Select top item in the list. actions.sendSpecialKey(Actions.SpecialKey.DOWN); @@ -85,7 +89,7 @@ public class testLoad extends ActivityInstrumentationTestCase2 { awesomebar.click(); getInstrumentation().waitForIdleSync(); - driver.is(urlbar.getText(), url, "Awesomebar URL is still correct"); + asserter.is(urlbar.getText(), url, "Awesomebar URL is still correct"); } @Override diff --git a/mobile/android/base/tests/testNewTab.java.in b/mobile/android/base/tests/testNewTab.java.in index dd6cb039f89f..deb60e9111e2 100644 --- a/mobile/android/base/tests/testNewTab.java.in +++ b/mobile/android/base/tests/testNewTab.java.in @@ -26,6 +26,7 @@ public class testNewTab extends ActivityInstrumentationTestCase2 { private Activity activity; private Actions actions; private Driver driver; + private Assert asserter; private static Class launcherActivityClass; static{ @@ -62,11 +63,15 @@ public class testNewTab extends ActivityInstrumentationTestCase2 { driver = new FennecNativeDriver(activity, solo); actions = new FennecNativeActions(activity, solo, getInstrumentation()); driver.setLogFile((String)config.get("logfile")); + + asserter = new FennecNativeAssert(); + asserter.setLogFile((String)config.get("logfile")); } public void testNewTab(){ // TODO: find a better way to not hardcode this url - String url = "http://mochi.test:8888/tests/robocop/robocop.html"; + String url = "http://mochi.test:8888/tests/robocop/robocop_blank_01.html"; + String url2 = "http://mochi.test:8888/tests/robocop/robocop_blank_02.html"; actions.waitForGeckoEvent("Gecko:Ready"); Element tabs = driver.findElement("tabs"); //Add one tab @@ -75,14 +80,14 @@ public class testNewTab extends ActivityInstrumentationTestCase2 { Element urlbar = driver.findElement("awesomebar_text"); getInstrumentation().waitForIdleSync(); actions.sendKeys(url); - driver.is(urlbar.getText(), url, "Awesomebar url is fine"); + asserter.is(urlbar.getText(), url, "Awesomebar url is fine"); actions.sendSpecialKey(Actions.SpecialKey.ENTER); actions.waitForGeckoEvent("DOMContentLoaded"); try{Thread.sleep(5000);}catch(Throwable e){}; //See tab count Element tabCount = driver.findElement("tabs_count"); - driver.is(tabCount.getText(), "2", "Number of tabs has increased"); + asserter.is(tabCount.getText(), "2", "Number of tabs has increased"); //Click tab list tabs.click(); @@ -91,14 +96,14 @@ public class testNewTab extends ActivityInstrumentationTestCase2 { //Add another tab addTab.click(); getInstrumentation().waitForIdleSync(); - actions.sendKeys(url); + actions.sendKeys(url2); getInstrumentation().waitForIdleSync(); - driver.is(urlbar.getText(), url, "URL is still fine"); + asserter.is(urlbar.getText(), url2, "URL is still fine"); actions.sendSpecialKey(Actions.SpecialKey.ENTER); actions.waitForGeckoEvent("DOMContentLoaded"); //Check tab count another time. - driver.is(tabCount.getText(), "3", "Number of tabs has increased"); + asserter.is(tabCount.getText(), "3", "Number of tabs has increased"); } diff --git a/mobile/android/base/tests/testPan.java.in b/mobile/android/base/tests/testPan.java.in index a6cec4eaa10e..f5e649581e2f 100644 --- a/mobile/android/base/tests/testPan.java.in +++ b/mobile/android/base/tests/testPan.java.in @@ -28,6 +28,7 @@ public class testPan extends ActivityInstrumentationTestCase2 { private Activity activity; private Driver driver; private Actions actions; + private Assert asserter; private static Class launcherActivityClass; static{ @@ -64,11 +65,14 @@ public class testPan extends ActivityInstrumentationTestCase2 { driver = new FennecNativeDriver(activity, solo); actions = new FennecNativeActions(activity, solo, getInstrumentation()); driver.setLogFile((String)config.get("logfile")); + + asserter = new FennecNativeAssert(); + asserter.setLogFile((String)config.get("logfile")); } public void testPan() { // TODO: find a better way to not hardcode this url - String url = "http://mochi.test:8888/tests/robocop/pantest.html"; + String url = "http://mochi.test:8888/startup_test/fenncmark/wikipedia.html"; actions.waitForGeckoEvent("Gecko:Ready"); Element awesomebar = driver.findElement("awesome_bar"); awesomebar.click(); @@ -76,7 +80,7 @@ public class testPan extends ActivityInstrumentationTestCase2 { Element urlbar = driver.findElement("awesomebar_text"); getInstrumentation().waitForIdleSync(); actions.sendKeys(url); - driver.is(url, urlbar.getText(),"Asserting Awesomebar typing works"); + asserter.is(url, urlbar.getText(),"Asserting Awesomebar typing works"); actions.sendSpecialKey(Actions.SpecialKey.ENTER); actions.waitForGeckoEvent("DOMContentLoaded"); @@ -101,7 +105,7 @@ public class testPan extends ActivityInstrumentationTestCase2 { } i++; } while( i < 1000 && driver.getScrollHeight() + 2*driver.getHeight() < driver.getPageHeight() ); - driver.ok(i < 1000, "Less than 1000", "Should take less than 1000 drags to get to bottom of the page."); +// asserter.ok(i < 1000, "Less than 1000", "Should take less than 1000 drags to get to bottom of the page."); int frames = driver.stopFrameRecording(); driver.dumpLog("__start_report" + Integer.toString(frames) + "__end_report");