Options
All
  • Public
  • Public/Protected
  • All
Menu

@sakuli/legacy

Index

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AccessorFunction

AccessorFunction: (identifier: AccessorIdentifier, ...relations: SahiRelation[]) => SahiElementQueryOrWebElement

Type declaration

AccessorFunctions

AccessorFunctions: Exclude<keyof AccessorApi, "_activeElement" | "_byId" | "_byText" | "_byClassName" | "_byXPath">

AccessorIdentifier

AccessorIdentifier: number | string | AccessorIdentifierAttributes | RegExp

Generic type which can be used in the most AccessorApi Functions. It is inspired by the Sahi syntax.

The AccessorIdentifer is part of a [ElementQuery]{@link ElementQuery} and probably the most used by test-authors.

Behavior will depend on the actual type of the identifier:

  • number: Is considered as the zero-based index of all found element
  • string: Is used to find an element by it's text-content
  • AccessorIdentifierAttributes: {@see AccessorIdentifierAttributes}
  • RegExp: Is used to find an element by it's text-content that matches the RegExp
example

Consider this HTML-snippet:

   <ul>
     <li>Item 1</li>
     <li>Item 2</li>
     <li>Item 3</li>
   </ul>

You can utilize the AccessorIdentifier like this:


    _listItem(0); // Queries `<li>Item 1</li>`
    _listItem("Item 2"); // Queries `<li>Item 2</li>`
    _listItem(/3/); // Queries `<li>Item 3</li>`

AccessorIdentifierAttributes

ActionApiFunction

ActionApiFunction: ReturnType<typeof actionApi>

Browsers

Browsers: Exclude<keyof typeof Capabilities, "prototype">

CapabilityMap

CapabilityMap: Record<Browsers, CapabilityProducer>

CapabilityProducer

CapabilityProducer: () => Capabilities

Type declaration

    • (): Capabilities
    • Returns Capabilities

CharInfo

CharInfo: string | number | [number, number]

A CharInfo can be:

  • a character (eg. 'b')
  • charCode of a character (eg. 98)
  • an array of [keyCode, charCode] (eg. [13,13] for pressing ENTER key)

ClickOptions

ClickOptions: { force: boolean }

Type declaration

  • force: boolean

DefaultAccessors

DefaultAccessors: Pick<AccessorApi, Exclude<keyof AccessorApi, "_activeElement" | "_byId" | "_byText" | "_byClassName" | "_byXPath">>

RelationProducer

RelationProducer: (anchorElement: SahiElementQueryOrWebElement) => SahiRelation

Type declaration

RelationProducerWithOffset

RelationProducerWithOffset: (anchorElement: SahiElementQueryOrWebElement, offset?: undefined | number) => SahiRelation

Type declaration

SahiElementQueryOrWebElement

SahiElementQueryOrWebElement: SahiElementQuery | WebElement

SahiRelation

SahiRelation: (elements: SahiElementQuery) => Promise<SahiElementQuery>

A Sahi relation is basically a mapping operation between two WebElement-Arrays Usually it is produced by a higher order function wich injects some context to it. function _in(element: WebElement) { return async (elements: WebElement[]) { return Promise.all(elements.map(...)) } }

Type declaration

ScreenRegionResult

ScreenRegionResult: { height: number; left: number; top: number; width: number }

Type declaration

  • height: number
  • left: number
  • top: number
  • width: number

ScreenshotFolderStructure

ScreenshotFolderStructure: "hierarchical" | "flat"

TextSelectionApi

TextSelectionApi: ReturnType<typeof textSelectionApi>

Vector2

Vector2: [number, number]

Variables

Const CHECK_OPEN_REQUESTS

CHECK_OPEN_REQUESTS: string = stripIndent`if ("sakuliHookEnabled" in window && window.sakuliHookEnabled) {return window.openRequests;}return 0;`

ElementClickInterceptedError

ElementClickInterceptedError: ElementClickInterceptedError

Const INJECT_SAKULI_HOOK

INJECT_SAKULI_HOOK: string = stripIndent`if (!("sakuliHookEnabled" in window) || !window.sakuliHookEnabled) {window.openRequests = 0;window.sakuliHookEnabled = true;const increaseOpenRequests = () => {++window.openRequests;}const decreaseOpenRequests = () => {--window.openRequests;window.openRequests = (window.openRequests >= 0) ? window.openRequests : 0;}const oldOpen = XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open = function(...args) {increaseOpenRequests();console.log("Open requests before XHR: " + window.openRequests);this.addEventListener('load', () => {while (this.readyState > 1 && this.readyState < 4) {console.log("Waiting on request");}if (this.readyState === 4) {decreaseOpenRequests();console.log("Open requests after XHR: " + window.openRequests);}})return oldOpen.apply(this, args);}const oldFetch = fetch;const newFetch = (input, init) => {increaseOpenRequests();console.log("Open requests before fetch: " + window.openRequests);return oldFetch(input, init).then(resp => {decreaseOpenRequests();console.log("Open requests after fetch: " + window.openRequests);return Promise.resolve(resp);}).catch(err => {decreaseOpenRequests();console.log("Open requests after fetch: " + window.openRequests);return Promise.reject(err);});}window.fetch = newFetch;}`

Const MASTERKEY_CLI_KEY

MASTERKEY_CLI_KEY: "masterkey" = "masterkey"

Const MASTERKEY_ENV_KEY

MASTERKEY_ENV_KEY: "SAKULI_ENCRYPTION_KEY" = "SAKULI_ENCRYPTION_KEY"

Const MASTERKEY_PROPERTY_KEY

MASTERKEY_PROPERTY_KEY: "sakuli.encryption.key" = "sakuli.encryption.key"

Const NoopSahiApi

NoopSahiApi: SahiApi = new Proxy(_NoopSahiApi, {get: (target: SahiApi, prop: keyof SahiApi) => {if (typeof target[prop] === "function") {return (...args: any[]) => {throw Error(`Cannot invoke function ${prop} in ui only tests`);};} else {return target[prop];}},})

Const RESET_OPEN_REQUESTS

RESET_OPEN_REQUESTS: string = stripIndent`if ("sakuliHookEnabled" in window && window.sakuliHookEnabled) {window.openRequests = 0;}`

Const SAHI_FUNCTIONS

SAHI_FUNCTIONS: string[] = ["_accessor","_button","_checkbox","_image","_imageSubmitButton","_link","_password","_radio","_select","_submit","_textarea","_textbox","_hidden","_event","_cell","_table","_byId","_row","_div","_span","_spandiv","_option","_reset","_file","_get","_byText","_byClassName","_label","_listItem","_list","_parentNode","_parentCell","_parentRow","_parentTable","_in","_near","_rte","_iframe","_tableHeader","_heading1","_heading2","_heading3","_heading4","_heading5","_heading6","_hidden","_area","_map","_italic","_bold","_emphasis","_strong","_preformatted","_code","_blockquote","_xy","_under","_above","_aboveOrUnder","_leftOf","_rightOf","_leftOrRightOf","_byXPath","_bySeleniumLocator","_getValue","_getAttribute","_containsText","_containsHTML","_getText","_getCellText","_getSelectedText","_lastAlert","_lastPrompt","_lastConfirm","_style","_cookie","_position","_rteHTML","_rteText","_isVisible","_contains","_title","_exists","_isIE","_isIE9","_isFF","_isFF3","_isFF4","_isChrome","_isSafari","_isOpera","_isHTMLUnit","_fetch","_random","_savedRandom","_getGlobal","_getDB","_readFile","_readURL","_print","_printCalled","_lastDownloadedFileName","_scriptName","_logException","_logExceptionAsFailure","_stopOnError","_continueOnError","_scriptPath","_re","_readCSVFile","_writeFile","_writeToFile","_deleteFile","_suiteInfo","_writeCSVFile","_areEqualArrays","_userDataDir","_setRecovery","_removeRecovery","_sessionInfo","_renameFile","_runUnitTests","_fail","_dataDrive","_condition","_setSpeed","_selectWindow","_selectDomain","_userDataPath","_evalOnProxy","_scriptStatus","_flex","_stackTrace","_dynamicInclude","_execute","_prompt","_confirm","_resolvePath","_datebox","_datetimebox","_datetimelocalbox","_emailbox","_monthbox","_numberbox","_rangebox","_searchbox","_telbox","_telephonebox","_sendHTMLResponseAfterFileDownload","_timebox","_urlbox","_weekbox","_abbr","_activeElement","_count","_collect","_canvas","_dList","_dTerm","_dDesc","_paragraph","_scriptStartTime","_section","_header","_nav","_aside","_footer","_article","_main","_figure","_address","_highlight","_div","_setValue","_navigateTo","_setSelected","_click",]

Const SahiSeleniumKeyMap

SahiSeleniumKeyMap: Map<string, string> = new Map<string, string>([["CTRL", Key.CONTROL],["SHIFT", Key.SHIFT],["ALT", Key.ALT],["META", Key.META],])

Any combo key: can be "CTRL", "SHIFT", "ALT" or "META"; Can also be two or more keys together like "CTRL|SHIFT" This argument is applicable only for Browser mode

Const theConfig

theConfig: NutGlobalConfig = new NutGlobalConfig()

Functions

accessorApi

actionApi

  • actionApi(webDriver: ThenableWebDriver, accessorUtil: AccessorUtil, ctx: TestExecutionContext): ActionApi

alertActionApi

  • alertActionApi(driver: ThenableWebDriver, accessorUtil: AccessorUtil, ctx: TestExecutionContext): { _authenticate: _authenticate }

Const applyBrowserOptions

  • applyBrowserOptions(browser: Browsers, project: Project, builder: Builder): void

assertionApi

charInfoToKey

  • charInfoToKey(charInfo: CharInfo): string

Const chromeOptionsFactory

commonActionsApi

Const copyShortcut

  • copyShortcut(): Key[]

createApplicationClass

  • createApplicationClass(ctx: TestExecutionContext, project: Project): Type<Application>

Const createCommand

  • createCommand(): CommandModule

Const createDriverFromProject

  • createDriverFromProject(project: Project, builder?: Builder, capabilityMap?: CapabilityMap): ThenableWebDriver

createEnvironmentClass

  • createEnvironmentClass(ctx: TestExecutionContext, project: Project): SakuliEnvironment

Const createKeyboardApi

  • createKeyboardApi(props: LegacyProjectProperties): { paste: any; pasteAndDecrypt: any; pressKey: any; releaseKey: any; type: any; typeAndDecrypt: any }

createLoggerObject

  • createLoggerObject(ctx: TestExecutionContext): Logger

Const createMouseApi

  • createMouseApi(props: LegacyProjectProperties): { click: any; doubleClick: any; dragAndDrop: any; move: any; pressButton: any; releaseButton: any; rightClick: any; scrollDown: any; scrollLeft: any; scrollRight: any; scrollUp: any }

Const createPackageJson

  • createPackageJson(path: string, suiteName: string): void

createRegionClass

  • createRegionClass(ctx: TestExecutionContext, project: Project): SakuliRegion

createTestCaseClass

  • createTestCaseClass(ctx: TestExecutionContext, project: Project, currentTestFolder: Maybe<string>, testStepCache?: TestStepCache): SakuliTestCase

Const createTestcaseDirectory

  • createTestcaseDirectory(path: string): void

Const createTestcaseFile

  • createTestcaseFile(path: string): void

Const createTestsuiteDirectory

  • createTestsuiteDirectory(directory: string): void

Const createTestsuiteProperties

  • createTestsuiteProperties(path: string, suiteName: string): void

Const createTestsuiteSuite

  • createTestsuiteSuite(path: string): void

createThenableApplicationClass

  • createThenableApplicationClass(ctx: TestExecutionContext, project: Project): Type<ThenableApplication>

createThenableEnvironmentClass

  • createThenableEnvironmentClass(ctx: TestExecutionContext, project: Project): Type<ThenableEnvironment>

createThenableRegionClass

  • createThenableRegionClass(ctx: TestExecutionContext, project: Project): Type<ThenableRegion>

createWithActionContext

  • createWithActionContext(ctx: TestExecutionContext): runAsAction

createWithRetries

  • createWithRetries(ctx: TestExecutionContext): withRetries

createWithTryAcrossFrames

  • createWithTryAcrossFrames(driver: ThenableWebDriver, ctx: TestExecutionContext): withTryAcrossFrames

Const cutShortcut

  • cutShortcut(): Key[]

decrypt

  • decrypt(key: string, encryptedInput: string): Promise<string>

Const determineResourcePath

  • determineResourcePath(imageName: string): string

distance

  • distance(__namedParameters: [number, number], __namedParameters: [number, number]): number

distanceBetween

  • distanceBetween(a: WebElement, b: WebElement): Promise<number>

distanceToParent

  • distanceToParent(child: WebElement, parent: WebElement): Promise<number>

Const edgeOptionsFactory

edges

Const encryptCommand

  • encryptCommand(): CommandModule

execute

fallbackHighlightWithBorder

  • fallbackHighlightWithBorder(elementToHighlight: WebElement, timeoutMs: number): Promise<void>

fetchApi

  • fetchApi(driver: ThenableWebDriver, accessorUtil: AccessorUtil, ctx: TestExecutionContext): FetchApi

fetchPageSource

  • fetchPageSource(webDriver: WebDriver, ctx: TestExecutionContext): Promise<string>

Const firefoxOptionsFactory

focusActionApi

Const getCoordinates

  • getCoordinates(region: Region): Promise<{ height: number; left: number; top: number; width: number }>

Const getEncryptionKey

  • getEncryptionKey(project: Project): string

getNearestCommonParent

  • getNearestCommonParent(a: WebElement, b: WebElement): Promise<WebElement>

getParent

  • getParent(element: WebElement): Promise<null | WebElement>

Const getScreenShotPath

getSeleniumKeysFromComboString

  • getSeleniumKeysFromComboString(combo: string): string[]

getSiblingIndex

  • getSiblingIndex(element: WebElement): Promise<number>

getSiblings

  • getSiblings(element: WebElement): Promise<WebElement[]>

Const getSuperKey

  • getSuperKey(): LeftControl | LeftSuper

Const getTestMetaData

Const getTimestamp

  • getTimestamp(when?: number, offset?: number): string
  • getTimestamp returns the local time in format YYYY-MM-ddTHH:mm:ss

    Parameters

    • Default value when: number = Date.now()

      Timestamp in milliseconds

    • Default value offset: number = 0

      Timezone offset in milliseconds

    Returns string

Const getTimezoneOffset

  • getTimezoneOffset(): number

highlightElement

  • highlightElement(element: WebElement, timeoutMs: number): Promise<void>

identifierToString

Const ieOptionsFactory

isAccessorIdentifierAttributes

  • isAccessorIdentifierAttributes(o: any): o is AccessorIdentifierAttributes

isAccessorIdentifierAttributesWithClassName

  • isAccessorIdentifierAttributesWithClassName(o: any): o is AccessorIdentifierAttributesWithClassName

isAccessorIdentifierAttributesWithSahiIndex

  • isAccessorIdentifierAttributesWithSahiIndex(o: any): o is AccessorIdentifierAttributesWithSahiIndex

isAccessorIdentifierAttributesWithText

  • isAccessorIdentifierAttributesWithText(o: any): o is AccessorIdentifierAttrbutesWithText

isChildOf

  • isChildOf(child: WebElement, potentialParent: WebElement): Promise<boolean>

Const isClickOptions

  • isClickOptions(options: any): options is ClickOptions

isElementCovered

  • isElementCovered(elem: WebElement, driver: WebDriver): Promise<boolean>

isEqual

  • isEqual(a: WebElement, b: WebElement): Promise<boolean>

isInVector

  • isInVector(x: number, __namedParameters: [number, number]): boolean

isLeftOf

  • isLeftOf(__namedParameters: [number], __namedParameters: [number]): boolean

isRightOf

  • isRightOf(__namedParameters: [number], __namedParameters: [number]): boolean

isSahiElementQuery

  • isSahiElementQuery(o: any): o is SahiElementQuery

isSahiFunction

  • isSahiFunction(name: string): boolean

isSibling

  • isSibling(a: WebElement, b: WebElement): Promise<boolean>

keyboardActionApi

Const legacyPreset

  • legacyPreset(reg: SakuliPresetRegistry): void
  • Parameters

    • reg: SakuliPresetRegistry

    Returns void

mapSahiToAsync

  • mapSahiToAsync(node: Node, changeLog: string[], parent: any | null): Node

migrateV1Code

  • migrateV1Code(code: string): string

migrationCommandProvider

  • migrationCommandProvider(): CommandModule

mouseActionApi

multipleElementApi

Const packageJson

  • packageJson(suiteName: string): string

parentApi

parseSahiTestsuiteDefiniton

  • parseSahiTestsuiteDefiniton(sahiTestsuiteDefinition: string): SahiTestCase[]

Const pasteShortcut

  • pasteShortcut(): Key[]

positionalInfo

registerSahiFunction

  • registerSahiFunction(name: string): void

relationsApi

  • relationsApi(driver: ThenableWebDriver, accessorUtil: AccessorUtil, testExecutionContext: TestExecutionContext): RelationApi

runActionsWithComboKeys

  • runActionsWithComboKeys(actions: Actions, combo?: string, whileKeysDown?: (a: Actions) => void): Actions

runAsAction

  • runAsAction<T>(ctx: TestExecutionContext, name: string, fn: T): T

sahiApi

  • sahiApi(driver: ThenableWebDriver, testExecutionContext: TestExecutionContext): SahiApi

sahiQueryToString

  • sahiQueryToString(__namedParameters: { identifier: string | number | RegExp | {}; locator: Function | By | { className: string } | { css: string } | { id: string } | { js: string } | { linkText: string } | { name: string } | { partialLinkText: string } | { tagName: string } | { xpath: string }; relations: ((elements: SahiElementQuery) => Promise<SahiElementQuery>)[] }): string
  • Parameters

    • __namedParameters: { identifier: string | number | RegExp | {}; locator: Function | By | { className: string } | { css: string } | { id: string } | { js: string } | { linkText: string } | { name: string } | { partialLinkText: string } | { tagName: string } | { xpath: string }; relations: ((elements: SahiElementQuery) => Promise<SahiElementQuery>)[] }
      • identifier: string | number | RegExp | {}
      • locator: Function | By | { className: string } | { css: string } | { id: string } | { js: string } | { linkText: string } | { name: string } | { partialLinkText: string } | { tagName: string } | { xpath: string }
      • relations: ((elements: SahiElementQuery) => Promise<SahiElementQuery>)[]

    Returns string

scrollIntoViewIfNeeded

  • scrollIntoViewIfNeeded(element: WebElement, ctx: TestExecutionContext): Promise<boolean>
  • scrollIntoViewIfNeeded will scroll a given {@link WebElement} into view to perform further actions on it. This is necessary to avoid errors due to elements not being in the current viewport.

    scrollIntoViewIfNeeded solves this problem by executing a script which calls scrollIntoView on a given element. Additionally, it will register a timeout (isScrollingTimeout) to handle

    • no scrolling at all, so the script will resolve after an initial delay
    • continuous scrolling, which will continuously update the timeout as long as we're still scrolling

    The reasoning for this behaviour is the fact that scrollIntoView resolves immediately, without taking into account the time the browser take to actually scroll the viewport. By adding an eventlistener to the browser's 'scroll' event, we're manually waiting for scrolling to end via said timeout

    Parameters

    • element: WebElement

      The {@link WebElement} to scroll into view

    • ctx: TestExecutionContext

      The current {@link TestExecutionContext}

    Returns Promise<boolean>

Const takeErrorScreenShot

  • takeErrorScreenShot(ctx: TestExecutionContext, screenshotStorage: ScreenshotFolderStructure, screenShotDestinationFolder: Maybe<string>): Promise<string>

Const testsuiteProperties

  • testsuiteProperties(suiteName: string): string

textSelectionApi

  • textSelectionApi(driver: ThenableWebDriver, accessorUtil: AccessorUtil, ctx: TestExecutionContext): { _selectRange: _selectRange; _selectTextRange: _selectTextRange }

Const timeout

  • timeout(updateInterval: number, maxDuration: number, action: (...params: any) => Promise<boolean>): Promise<unknown>
  • Parameters

    • updateInterval: number
    • maxDuration: number
    • action: (...params: any) => Promise<boolean>
        • (...params: any): Promise<boolean>
        • Parameters

          • Rest ...params: any

          Returns Promise<boolean>

    Returns Promise<unknown>

Const toNutRegion

  • toNutRegion(region: Region): Promise<NutRegion>

vectorAdd

  • vectorAdd(__namedParameters: [number, number], __namedParameters: [number, number]): Vector2

wait

  • wait(milliseconds: number): Promise<void>

withEncryption

  • withEncryption<T>(key: string, encryptedInput: string, action: (input: string) => Promise<T>): Promise<T>
  • Type parameters

    • T

    Parameters

    • key: string
    • encryptedInput: string
    • action: (input: string) => Promise<T>
        • (input: string): Promise<T>
        • Parameters

          • input: string

          Returns Promise<T>

    Returns Promise<T>

wrapWithAsyncIIFE

  • wrapWithAsyncIIFE(body: any[], sourceType?: string): { body: { type: string; expression: object }[]; sourceType: string; type: string }
  • Parameters

    • body: any[]
    • Default value sourceType: string = "module"

    Returns { body: { type: string; expression: object }[]; sourceType: string; type: string }

    • body: { type: string; expression: object }[]
    • sourceType: string
    • type: string

writeAsyncChangeLog

  • writeAsyncChangeLog(changeLog: string[], node: any): void

Object literals

Const ClipboardApi

ClipboardApi: object

cleanClipboard

  • cleanClipboard(): Promise<void>

copyIntoClipboard

  • copyIntoClipboard(): Promise<void>

getClipboard

  • getClipboard(): Promise<string>

paste

  • paste(): Promise<string>

pasteClipboard

  • pasteClipboard(): Promise<void>

setClipboard

  • setClipboard(text: string): Promise<void>

Const ScreenApi

ScreenApi: object

find

getRegionFromFocusedWindow

height

  • height(): Promise<number>

highlight

  • highlight(regionToHighlight: Region, duration: number): Promise<Region>

takeScreenshot

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

takeScreenshotWithTimestamp

  • takeScreenshotWithTimestamp(filename: string): Promise<string>

waitForImage

  • waitForImage(filepath: string, path: string, confidence: number, timeoutMs: number, searchRegion: Region): Promise<ScreenRegionResult>

width

  • width(): Promise<number>

Const _NoopSahiApi

_NoopSahiApi: object

_abbr

_above

_activeElement

_areEqual

_area

_article

_aside

_assert

  • _assert(condition: Promise<boolean>, message?: undefined | string): Promise<void>

_assertContainsText

_assertEqual

  • _assertEqual(expected: any, actual: any, message?: String): Promise<void>

_assertEqualArrays

  • _assertEqualArrays(expected: Array<any>, actual: Array<any>, message?: String): Promise<void>

_assertExists

_assertFalse

  • _assertFalse(condition: Promise<boolean>, message?: String): Promise<void>

_assertNotContainsText

_assertNotEqual

  • _assertNotEqual(expected: any, actual: any, message?: String): Promise<void>

_assertNotExists

_assertNotNull

  • _assertNotNull(value: any, message?: String): Promise<void>

_assertNotTrue

  • _assertNotTrue(condition: Promise<boolean>, message?: String): Promise<void>

_assertNull

  • _assertNull(value: any, message?: String): Promise<void>

_assertTrue

  • _assertTrue(condition: Promise<boolean>, message?: String): Promise<void>

_blockquote

_blur

_bold

_button

_byClassName

_byId

_byText

_byXPath

_canvas

_cell

_check

_checkbox

_click

_code

_collect

  • _collect(accessorApiMethod: "_password" | "_textbox" | "_hidden" | "_datebox" | "_datetimebox" | "_datetimelocalbox" | "_emailbox" | "_monthbox" | "_numberbox" | "_rangebox" | "_searchbox" | "_telephonebox" | "_timebox" | "_urlbox" | "_weekbox" | "_textarea" | "_button" | "_checkbox" | "_radio" | "_submit" | "_reset" | "_imageSubmitButton" | "_select" | "_option" | "_file" | "_table" | "_row" | "_cell" | "_tableHeader" | "_link" | "_image" | "_label" | "_listItem" | "_list" | "_div" | "_span" | "_fieldset" | "_heading1" | "_heading2" | "_heading3" | "_heading4" | "_heading5" | "_heading6" | "_area" | "_map" | "_paragraph" | "_italic" | "_emphasis" | "_bold" | "_strong" | "_preformatted" | "_code" | "_blockquote" | "_canvas" | "_abbr" | "_hr" | "_iframe" | "_rte" | "_frame" | "_object" | "_embed" | "_dList" | "_dTerm" | "_dDesc" | "_font" | "_svg_rect" | "_svg_tspan" | "_svg_circle" | "_svg_ellipse" | "_svg_line" | "_svg_polygon" | "_svg_polyline" | "_svg_path" | "_svg_text" | "_article" | "_aside" | "_details" | "_figcaption" | "_figure" | "_footer" | "_header" | "_main" | "_mark" | "_nav" | "_section" | "_summary" | "_time" | "_video", identifier: AccessorIdentifier, ...relations: SahiRelation[]): Promise<WebElement[]>
  • Parameters

    • accessorApiMethod: "_password" | "_textbox" | "_hidden" | "_datebox" | "_datetimebox" | "_datetimelocalbox" | "_emailbox" | "_monthbox" | "_numberbox" | "_rangebox" | "_searchbox" | "_telephonebox" | "_timebox" | "_urlbox" | "_weekbox" | "_textarea" | "_button" | "_checkbox" | "_radio" | "_submit" | "_reset" | "_imageSubmitButton" | "_select" | "_option" | "_file" | "_table" | "_row" | "_cell" | "_tableHeader" | "_link" | "_image" | "_label" | "_listItem" | "_list" | "_div" | "_span" | "_fieldset" | "_heading1" | "_heading2" | "_heading3" | "_heading4" | "_heading5" | "_heading6" | "_area" | "_map" | "_paragraph" | "_italic" | "_emphasis" | "_bold" | "_strong" | "_preformatted" | "_code" | "_blockquote" | "_canvas" | "_abbr" | "_hr" | "_iframe" | "_rte" | "_frame" | "_object" | "_embed" | "_dList" | "_dTerm" | "_dDesc" | "_font" | "_svg_rect" | "_svg_tspan" | "_svg_circle" | "_svg_ellipse" | "_svg_line" | "_svg_polygon" | "_svg_polyline" | "_svg_path" | "_svg_text" | "_article" | "_aside" | "_details" | "_figcaption" | "_figure" | "_footer" | "_header" | "_main" | "_mark" | "_nav" | "_section" | "_summary" | "_time" | "_video"
    • identifier: AccessorIdentifier
    • Rest ...relations: SahiRelation[]

    Returns Promise<WebElement[]>

_contains

_containsHTML

_containsText

_count

  • _count(accessorApiMethod: "_password" | "_textbox" | "_hidden" | "_datebox" | "_datetimebox" | "_datetimelocalbox" | "_emailbox" | "_monthbox" | "_numberbox" | "_rangebox" | "_searchbox" | "_telephonebox" | "_timebox" | "_urlbox" | "_weekbox" | "_textarea" | "_button" | "_checkbox" | "_radio" | "_submit" | "_reset" | "_imageSubmitButton" | "_select" | "_option" | "_file" | "_table" | "_row" | "_cell" | "_tableHeader" | "_link" | "_image" | "_label" | "_listItem" | "_list" | "_div" | "_span" | "_fieldset" | "_heading1" | "_heading2" | "_heading3" | "_heading4" | "_heading5" | "_heading6" | "_area" | "_map" | "_paragraph" | "_italic" | "_emphasis" | "_bold" | "_strong" | "_preformatted" | "_code" | "_blockquote" | "_canvas" | "_abbr" | "_hr" | "_iframe" | "_rte" | "_frame" | "_object" | "_embed" | "_dList" | "_dTerm" | "_dDesc" | "_font" | "_svg_rect" | "_svg_tspan" | "_svg_circle" | "_svg_ellipse" | "_svg_line" | "_svg_polygon" | "_svg_polyline" | "_svg_path" | "_svg_text" | "_article" | "_aside" | "_details" | "_figcaption" | "_figure" | "_footer" | "_header" | "_main" | "_mark" | "_nav" | "_section" | "_summary" | "_time" | "_video", identifier: AccessorIdentifier, ...relations: SahiRelation[]): Promise<number>
  • Parameters

    • accessorApiMethod: "_password" | "_textbox" | "_hidden" | "_datebox" | "_datetimebox" | "_datetimelocalbox" | "_emailbox" | "_monthbox" | "_numberbox" | "_rangebox" | "_searchbox" | "_telephonebox" | "_timebox" | "_urlbox" | "_weekbox" | "_textarea" | "_button" | "_checkbox" | "_radio" | "_submit" | "_reset" | "_imageSubmitButton" | "_select" | "_option" | "_file" | "_table" | "_row" | "_cell" | "_tableHeader" | "_link" | "_image" | "_label" | "_listItem" | "_list" | "_div" | "_span" | "_fieldset" | "_heading1" | "_heading2" | "_heading3" | "_heading4" | "_heading5" | "_heading6" | "_area" | "_map" | "_paragraph" | "_italic" | "_emphasis" | "_bold" | "_strong" | "_preformatted" | "_code" | "_blockquote" | "_canvas" | "_abbr" | "_hr" | "_iframe" | "_rte" | "_frame" | "_object" | "_embed" | "_dList" | "_dTerm" | "_dDesc" | "_font" | "_svg_rect" | "_svg_tspan" | "_svg_circle" | "_svg_ellipse" | "_svg_line" | "_svg_polygon" | "_svg_polyline" | "_svg_path" | "_svg_text" | "_article" | "_aside" | "_details" | "_figcaption" | "_figure" | "_footer" | "_header" | "_main" | "_mark" | "_nav" | "_section" | "_summary" | "_time" | "_video"
    • identifier: AccessorIdentifier
    • Rest ...relations: SahiRelation[]

    Returns Promise<number>

_dDesc

_dList

_dTerm

_datebox

_datetimebox

_datetimelocalbox

_details

_div

_dragDrop

_dragDropXY

_dynamicInclude

  • _dynamicInclude(): Promise<void>

_emailbox

_embed

_emphasis

_eval

  • _eval<T>(source: string, ..._args: any[]): Promise<T>

_exists

_fetch

_fieldset

_figcaption

_figure

_file

_focus

_font

_footer

_frame

_getAttribute

_getCellText

_getFetchTimeout

  • _getFetchTimeout(): never

_getOptions

_getSelectedText

_getSelectionText

  • _getSelectionText(): Promise<string>

_getText

_getValue

_header

_heading1

_heading2

_heading3

_heading4

_heading5

_heading6

_hidden

_highlight

_hr

_iframe

_image

_imageSubmitButton

_in

_isChecked

_isEnabled

_isVisible

_italic

_keyDown

_keyPress

_keyUp

_label

_leftOf

_leftOrRightOf

_link

_list

_listItem

_main

_map

_mark

_monthbox

_mouseDown

_mouseOver

_mouseUp

_nav

_navigateTo

  • _navigateTo(target: string, forceReload?: boolean | undefined, credentials?: { password: string; user: string } | undefined): Promise<any>
  • Parameters

    • target: string
    • Optional forceReload: boolean | undefined
    • Optional credentials: { password: string; user: string } | undefined

    Returns Promise<any>

_near

_numberbox

_object

_option

_pageIsStable

  • _pageIsStable(timeout?: undefined | number, interval?: undefined | number): Promise<boolean>

_paragraph

_parentCell

_parentNode

_parentRow

_parentTable

_password

_position

_preformatted

_radio

_rangebox

_removeFocus

_reset

_rightClick

_rightOf

_row

_rte

_rteWrite

_searchbox

_section

_select

_setFetchTimeout

  • _setFetchTimeout(timeout: number): void

_setSelected

  • _setSelected(query: SahiElementQueryOrWebElement, optionToSelect: string | number | string[] | number[], isMultiple?: boolean | undefined): Promise<void>

_setValue

_span

_strong

_style

_submit

_summary

_svg_circle

_svg_ellipse

_svg_line

_svg_path

_svg_polygon

_svg_polyline

_svg_rect

_svg_text

_svg_tspan

_table

_tableHeader

_telephonebox

_textarea

_textbox

_time

_timebox

_title

  • _title(): Promise<string>

_type

_uncheck

_under

_underOrAbove

_urlbox

_video

_wait

_weekbox

_xy

  • _xy(): never

Const defaultCapabilityMap

defaultCapabilityMap: object

android

  • android(): Capabilities

chrome

  • chrome(): Capabilities

edge

  • edge(): Capabilities

firefox

  • firefox(): Capabilities

htmlunit

  • htmlunit(): Capabilities

htmlunitwithjs

  • htmlunitwithjs(): Capabilities

ie

  • ie(): Capabilities

ipad

  • ipad(): Capabilities

iphone

  • iphone(): Capabilities

opera

  • opera(): Capabilities

phantomjs

  • phantomjs(): Capabilities

safari

  • safari(): Capabilities