Skip to main content

externalProtractorPage

Protractor-specific implementation of Page.

Hierarchy

  • Page<protractor.ElementFinder>
    • ProtractorPage

Index

Constructors

externalconstructor

Properties

externalreadonlyid

id: CorrelationId

Methods

externalcreatePageElement

  • createPageElement(nativeElement: ElementFinder): PageElement<ElementFinder>
  • Parameters

    • externalnativeElement: ElementFinder

    Returns PageElement<ElementFinder>

externallocate

externallocateAll

externalenableAngularSynchronisation

  • enableAngularSynchronisation(enable: boolean): Promise<boolean>
  • If set to false, Protractor will not wait for Angular 1.x $http and $timeout tasks to complete before interacting with the browser.

    This can be useful when:

    • you need to switch to a non-Angular app during your tests, e.g. to sign in using an SSO gateway
    • your app continuously polls an API with $timeout

    If you're not testing an Angular app, it's better to disable Angular synchronisation completely in protractor configuration:

    // protractor.conf.js
    exports.config = {
    onPrepare: function () {
    return browser.waitForAngularEnabled(false)
    },

    // ... other config
    }

    Parameters

    • externalenable: boolean

    Returns Promise<boolean>

externalnavigateTo

  • navigateTo(destination: string): Promise<void>
  • Parameters

    • externaldestination: string

    Returns Promise<void>

externalnavigateBack

  • navigateBack(): Promise<void>
  • Returns Promise<void>

externalnavigateForward

  • navigateForward(): Promise<void>
  • Returns Promise<void>

externalreload

  • reload(): Promise<void>
  • Returns Promise<void>

externalsendKeys

  • sendKeys(keys: (string | Key)[]): Promise<void>
  • Parameters

    • externalkeys: (string | Key)[]

    Returns Promise<void>

externalexecuteScript

  • executeScript<Result, InnerArguments>(script: string | (...parameters: InnerArguments) => Result, ...args: InnerArguments): Promise<Result>
  • Type parameters

    • Result
    • InnerArguments: any[]

    Parameters

    • externalscript: string | (...parameters: InnerArguments) => Result
      • externalrest...args: InnerArguments

      Returns Promise<Result>

    externalexecuteAsyncScript

    • executeAsyncScript<Result, Parameters>(script: string | (...args: [...parameters: Parameters[], callback: (result: Result) => void]) => void, ...args: Parameters): Promise<Result>
    • Type parameters

      • Result
      • Parameters: any[]

      Parameters

      • externalscript: string | (...args: [...parameters: Parameters[], callback: (result: Result) => void]) => void
        • externalrest...args: Parameters

        Returns Promise<Result>

      externallastScriptExecutionResult

      • lastScriptExecutionResult(): any
      • Returns any

      externaltakeScreenshot

      • takeScreenshot(): Promise<string>
      • Returns Promise<string>

      externalcookie

      • cookie(name: string): Promise<Cookie>
      • Parameters

        • externalname: string

        Returns Promise<Cookie>

      externalsetCookie

      • Parameters

        Returns Promise<void>

      externaldeleteAllCookies

      • deleteAllCookies(): Promise<void>
      • Returns Promise<void>

      externaltitle

      • title(): Promise<string>
      • Returns Promise<string>

      externalname

      • name(): Promise<string>
      • Returns Promise<string>

      externalurl

      • url(): Promise<URL>
      • Returns Promise<URL>

      externalviewportSize

      • viewportSize(): Promise<{ width: number; height: number }>
      • Returns Promise<{ width: number; height: number }>

      externalsetViewportSize

      • setViewportSize(size: { width: number; height: number }): Promise<void>
      • Parameters

        • externalsize: { width: number; height: number }
          • externalwidth: number
          • externalheight: number

        Returns Promise<void>

      externalclose

      • close(): Promise<void>
      • Returns Promise<void>

      externalcloseOthers

      • closeOthers(): Promise<void>
      • Returns Promise<void>

      externalisPresent

      • isPresent(): Promise<boolean>
      • Returns Promise<boolean>

      externalswitchTo

      • Switches the current browsing context to the given page and returns an object that allows the caller to switch back to the previous context when needed.

        Learn more


        Returns Promise<SwitchableOrigin>

      externalmodalDialog

      externaltoString

      • toString(): string
      • Returns a description of this Page and its ID.


        Returns string