Share this page

com.hp.lft.sdk.web

## Interface Page

- All Superinterfaces:
    SupportsNativeObject, TestObject, TestObjectDescriber, WebTestObjectDescriber

      public interface Page
      extends TestObject, WebTestObjectDescriber, SupportsNativeObject

  An HTML page.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.awt.Point` | `getAbsoluteLocation()` Returns this object's absolute coordinates relative to the screen (in pixels).
    `java.awt.Dimension` | `getSize()` Returns the object's size (in pixels).
    `java.lang.String` | `getText()` Returns the inner text of the body element.
    `java.lang.String` | `getTitle()` Returns the page's title.
    `java.lang.String` | `getURL()` Returns the URL of the page.
    `java.lang.String` | `runJavaScript(java.lang.String scriptToRun)` Runs the given JavaScript code in the page's context and returns the result.
    `<TResult> TResult` | `runJavaScript(java.lang.String scriptToRun, java.lang.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.TestObject

      `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.web.WebTestObjectDescriber

      `describe, describe`

    - ### Methods inherited from interface com.hp.lft.sdk.TestObjectDescriber

      `describe`

    - ### Methods inherited from interface com.hp.lft.sdk.SupportsNativeObject

      `getNativeObject`

- - ### Method Detail

    - #### getURL

          java.lang.String getURL()
                           throws GeneralLeanFtException

      Returns the URL of the page.
      Returns:
        the URL of the page.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getText

          java.lang.String getText()
                            throws GeneralLeanFtException

      Returns the inner text of the body element.
      Returns:
        the inner text of the body element.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getTitle

          java.lang.String getTitle()
                             throws GeneralLeanFtException

      Returns the page's title.
      Returns:
        the page's title.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getAbsoluteLocation

          java.awt.Point getAbsoluteLocation()
                                      throws GeneralLeanFtException

      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 an error occurs during execution.

    - #### getSize

          java.awt.Dimension getSize()
                              throws GeneralLeanFtException

      Returns the object's size (in pixels).
      Returns:
        the object's size (in pixels).
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### runJavaScript

          <TResult> TResult runJavaScript(java.lang.String scriptToRun,
                                          java.lang.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 an error occurs during execution.

    - #### runJavaScript

          java.lang.String runJavaScript(java.lang.String scriptToRun)
                                  throws GeneralLeanFtException

      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 an error occurs during execution.

    - #### sync

          void sync()
             throws GeneralLeanFtException

      Waits for the page state to be idle.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

Tips to improve your search results... UFT Developer Java SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: