This document contains a simple preliminary descritption of testcases on CurrentPage interface of Webclient API.

1. Tests on copyCurrentSelectionToSystemClipboard() method.

Test IDActionExpected Result
basic/api/CurrentPage_copyCurSel:0Method is invoked without any URL stringBrowser doesn't crashed
basic/api/CurrentPage_copyCurSel:1Method is invoked with no selectionClipboard content doesn't change
basic/api/CurrentPage_copyCurSel:2Method is invoked with selected textClipboard gets selected text

2. Tests on findInPage(String search_string, boolean forward, boolean matchcase) method.

Test IDActionExpected Result
basic/api/CurrentPage_findInPage_1:0Method is invoked with null search stringBrowser doesn't crashed
basic/api/CurrentPage_findInPage_1:1Method is invoked with empty search stringBrowser doesn't crashed
basic/api/CurrentPage_findInPage_1:2Method is invoked with exist search stringBrowser finds search string
basic/api/CurrentPage_findInPage_1:3Method is invoked without any URLBrowser doesn't crashed
basic/api/CurrentPage_findInPage_1:4Method is invoked with unexist search stringBrowser doesn't crashed and finds nothing
basic/mixed/CurrentPage_findInPage_2:0Method is invoked with forward=true and matchcase=trueBrowser finds search string
basic/mixed/CurrentPage_findInPage_2:1Method is invoked with forward=true and matchcase=falseBrowser finds search string
basic/mixed/CurrentPage_findInPage_2:2Method is invoked with forward=false and matchcase=trueBrowser finds search string
basic/mixed/CurrentPage_findInPage_2:3Method is invoked with forward=false and matchcase=falseBrowser finds search string

3. Tests on findNextInPage(boolean forward) method.

Test IDActionExpected Result
basic/mixed/CurrentPage_findNextInPage:0Method is invoked with forward=trueBrowser finds search string
basic/mixed/CurrentPage_findNextInPage:1Method is invoked with forward=falseBrowser finds search string
basic/mixed/CurrentPage_findNextInPage:2Method is invoked without previous findBrowser finds nothing and doesn't crash
basic/mixed/CurrentPage_findNextInPage:3Method is invoked at the end of documentBrowser finds nothing and doesn't crash

4. Tests on getCurrentURL() method.

Test IDActionExpected Result
basic/api/CurrentPage_getCurrentURL:0Method is invoked after URL is loadedMethod returns current URL
basic/api/CurrentPage_getCurrentURL:1Method is invoked during URL is loadingMethod returns current URL
basic/api/CurrentPage_getCurrentURL:2Method is invoked without any URLBrowser doesn't crashed

5. Tests on getSource() method.

Test IDActionExpected Result
basic/api/CurrentPage_getSource:0Method is invoked without any URLBrowser doesn't crashed
basic/api/CurrentPage_getSource:1Method is invoked with correct URLMethod returns URL source

6. Tests on getSourceBytes() method.

Test IDActionExpected Result
basic/api/CurrentPage_getSourceBytes:0Method is invoked without any URLBrowser doesn't crashed
basic/api/CurrentPage_getSourceBytes:1Method is invoked with correct URLMethod returns URL source bytes

7. Tests on resetFind() method.

Test IDActionExpected Result
basic/api/CurrentPage_resetFind:0Method is invoked without any URLBrowser doesn't crashed
basic/api/CurrentPage_resetFind:1Method is invoked with previous search resultFind parameters is nulled
basic/api/CurrentPage_resetFind:2Method is invoked without previous search resultBrowser doesn't crashed and find parameters is nulled

8. Tests on selectAll() method.

Test IDActionExpected Result
basic/api/CurrentPage_selectAll:0Method is invoked without any URLBrowser doesn't crashed
basic/api/CurrentPage_selectAll:1Method is invoked with correct URLAll is selected

9. Tests on getDOM() method.

Test IDActionExpected Result
basic/api/CurrentPage_getDOM:0Method is invoked without any URLBrowser doesn't crashed
basic/api/CurrentPage_getDOM:1Method is invoked with correct URLCorrect org.w3c.dom.Document object is returned

9. Tests on getPageInfo() method.

Test IDActionExpected Result
basic/api/CurrentPage_getPageInfo:0Method is invoked without any URLBrowser doesn't crashed
basic/api/CurrentPage_getPageInfo:1Method is invoked with correct URLCorrect java.util.Properties object is returned