externalProtractorPage
Hierarchy
- Page<protractor.ElementFinder>
- ProtractorPage
Index
Constructors
Properties
Methods
- createPageElement
- locate
- locateAll
- enableAngularSynchronisation
- navigateTo
- navigateBack
- navigateForward
- reload
- sendKeys
- executeScript
- executeAsyncScript
- lastScriptExecutionResult
- takeScreenshot
- cookie
- setCookie
- deleteAllCookies
- title
- name
- url
- viewportSize
- setViewportSize
- close
- closeOthers
- isPresent
- switchTo
- modalDialog
- toString
Constructors
externalconstructor
Parameters
externalsession: ProtractorBrowsingSession
externalbrowser: ProtractorBrowser
externalmodalDialogHandler: ModalDialogHandler
externalerrorHandler: ProtractorErrorHandler
externalpageId: CorrelationId
Returns ProtractorPage
Properties
externalreadonlyid
Methods
externalcreatePageElement
Parameters
externalnativeElement: ElementFinder
Returns PageElement<ElementFinder>
externallocate
Parameters
externalselector: Selector
Returns PageElement<ElementFinder>
externallocateAll
Parameters
externalselector: Selector
Returns PageElements<ElementFinder>
externalenableAngularSynchronisation
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
Parameters
externaldestination: string
Returns Promise<void>
externalnavigateBack
Returns Promise<void>
externalnavigateForward
Returns Promise<void>
externalreload
Returns Promise<void>
externalsendKeys
Parameters
externalkeys: (string | Key)[]
Returns Promise<void>
externalexecuteScript
Type parameters
- Result
- InnerArguments: any[]
Parameters
externalscript: string | (...parameters: InnerArguments) => Result
externalrest...args: InnerArguments
Returns Promise<Result>
externalexecuteAsyncScript
Type parameters
- Result
- Parameters: any[]
Parameters
externalscript: string | (...args: [...parameters: Parameters[], callback: (result: Result) => void]) => void
externalrest...args: Parameters
Returns Promise<Result>
externallastScriptExecutionResult
Returns any
externaltakeScreenshot
Returns Promise<string>
externalcookie
Parameters
externalname: string
Returns Promise<Cookie>
externalsetCookie
Parameters
externalcookieData: CookieData
Returns Promise<void>
externaldeleteAllCookies
Returns Promise<void>
externaltitle
Returns Promise<string>
externalname
Returns Promise<string>
externalurl
Returns Promise<URL>
externalviewportSize
Returns Promise<{ width: number; height: number }>
externalsetViewportSize
Parameters
externalsize: { width: number; height: number }
externalwidth: number
externalheight: number
Returns Promise<void>
externalclose
Returns Promise<void>
externalcloseOthers
Returns Promise<void>
externalisPresent
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
Returns the
ModalDialogHandler
for the currentPage
.Returns ModalDialogHandler
externaltoString
Returns a description of this Page and its ID.
Returns string
Protractor-specific implementation of
Page
.