Package com.hp.lft.sdk.web
Interface Frame
- All Superinterfaces:
LocationInfoProvider
,SupportsNativeObject
,TestObject
,TestObjectDescriber
,VisibleProvider
,WaitUntilVisibleProvider
,WebTestObject
,WebTestObjectDescriber
A Web frame object that represents both the frame element in a frame set and an embedded frame that uses the frame element.
The frame is a separate HTML document that is part of the test object hierarchy.
-
Method Summary
Modifier and TypeMethodDescriptiongetText()
Returns the inner text of the body element.getURL()
Returns the URL of the frame.runJavaScript
(String scriptToRun) Runs the given JavaScript code in the frame's context and returns the result.<TResult> TResult
runJavaScript
(String scriptToRun, Class<TResult> returnType) Runs the given JavaScript text in the frame's context and returns the result cast to returnType.void
sync()
Waits for the frame's state to be idle.Methods inherited from interface com.hp.lft.sdk.LocationInfoProvider
getAbsoluteLocation, getLocation, getSize
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.WaitUntilVisibleProvider
waitUntilVisible, waitUntilVisible
Methods inherited from interface com.hp.lft.sdk.web.WebTestObject
getAttribute, getAttributes, getClassName, getComputedStyle, getComputedStyles, getId, getInnerHTML, getInnerText, getName, getOuterHTML, getOuterText, getTagName, getTitle, isVisible
Methods inherited from interface com.hp.lft.sdk.web.WebTestObjectDescriber
describe, describe
-
Method Details
-
getURL
Returns the URL of the frame.- Returns:
- the URL of the frame.
- 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
-
runJavaScript
<TResult> TResult runJavaScript(String scriptToRun, Class<TResult> returnType) throws GeneralLeanFtException Runs the given JavaScript text in the frame's context and returns the result cast to returnType.- Type Parameters:
TResult
- the generic type of return type.- Parameters:
scriptToRun
- the JavaScript code to run.returnType
- the type of return value.- Returns:
- the numeric result of running the JavaScript code.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
runJavaScript
Runs the given JavaScript code in the frame's context and returns the result.- Parameters:
scriptToRun
- the JavaScript code to run.- Returns:
- the result of running the JavaScript code as a string.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
sync
Waits for the frame's state to be idle.- Throws:
GeneralLeanFtException
- if error occurs during execution
-