Package com.hp.lft.sdk.web
Interface Page
- All Superinterfaces:
SupportsNativeObject
,TestObject
,TestObjectDescriber
,WebTestObjectDescriber
An HTML page.
-
Method Summary
Modifier and TypeMethodDescriptionReturns this object's absolute coordinates relative to the screen (in pixels).getSize()
Returns the object's size (in pixels).getText()
Returns the inner text of the body element.getTitle()
Returns the page's title.getURL()
Returns the URL of the page.runJavaScript
(String scriptToRun) Runs the given JavaScript code in the page's context and returns the result.<TResult> TResult
runJavaScript
(String scriptToRun, Class<TResult> returnType) Runs the given JavaScript code in the page's context and returns the result cast to returnType.void
sync()
Waits for the page state to be idle.Methods inherited from interface com.hp.lft.sdk.SupportsNativeObject
getNativeObject
Methods inherited from interface com.hp.lft.sdk.TestObject
callFTMethod, callFTMethod, exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExists
Methods inherited from interface com.hp.lft.sdk.TestObjectDescriber
describe
Methods inherited from interface com.hp.lft.sdk.web.WebTestObjectDescriber
describe, describe
-
Method Details
-
getURL
Returns the URL of the page.- Returns:
- the URL of the page.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getText
Returns the inner text of the body element.- Returns:
- the inner text of the body element.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getTitle
Returns the page's title.- Returns:
- the page's title.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getAbsoluteLocation
Returns this object's absolute coordinates relative to the screen (in pixels).
0,0 is always the top-left corner of the (primary) monitor.- Returns:
- the object's absolute coordinates relative to the screen (in pixels).
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getSize
Returns the object's size (in pixels).- Returns:
- the object's size (in pixels).
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
runJavaScript
<TResult> TResult runJavaScript(String scriptToRun, Class<TResult> returnType) throws GeneralLeanFtException Runs the given JavaScript code in the page's context and returns the result cast to returnType.- Type Parameters:
TResult
- the generic type of returntype.- Parameters:
scriptToRun
- the JavaScript code to run.returnType
- the type of return value.- Returns:
- the numeric result of running the JavaScript.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
runJavaScript
Runs the given JavaScript code in the page's context and returns the result.- Parameters:
scriptToRun
- the JavaScript code to run.- Returns:
- the string result of running the JavaScript.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
sync
Waits for the page state to be idle.- Throws:
GeneralLeanFtException
- if error occurs during execution
-