Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Application

Hierarchy

  • Application

Index

Constructors

constructor

  • new Application(mochaTestContext: Context, id: string, executablePath: string, executableDirectory: string, appAsarPath: string, additionalArgs?: string[]): Application
  • Parameters

    • mochaTestContext: Context
    • id: string
    • executablePath: string
    • executableDirectory: string
    • appAsarPath: string
    • Default value additionalArgs: string[] = []

    Returns Application

Properties

Readonly event

event: EventEmitter = new EventEmitter()

Readonly id

id: string

Readonly isDedicatedServer

isDedicatedServer: boolean

Readonly logsDirectory

logsDirectory: string

Readonly userDataDirectory

userDataDirectory: string

Methods

clearDirectory

  • clearDirectory(directory: string): Promise<void>
  • Parameters

    • directory: string

    Returns Promise<void>

clearSavedStates

  • clearSavedStates(): void
  • Returns void

clickBack

  • Returns Promise<void>

clickButton

  • clickButton(name: string, timeout?: number): Promise<void>
  • Parameters

    • name: string
    • Default value timeout: number = visibleTimeout

    Returns Promise<void>

clickButtonIfVisible

  • clickButtonIfVisible(name: string): Promise<boolean>
  • Parameters

    • name: string

    Returns Promise<boolean>

clickConfirm

  • Returns Promise<void>

clickContinueGame

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

clickDailyChallenge

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

clickJoinServer

  • Returns Promise<void>

clickLoadGame

  • Returns Promise<void>

clickMultiplayer

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

clickNewCharacter

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

clickNewGame

  • Returns Promise<void>

clickNewGameCheckbox

  • clickNewGameCheckbox(name: string): Promise<void>
  • Parameters

    • name: string

    Returns Promise<void>

clickSaveSlot

  • Returns Promise<void>

clickUnPauseGame

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

clickYesIfVisible

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

debug

  • Returns Promise<void>

executeJavaScript

  • executeJavaScript<T>(javascript: string): Promise<T>
  • Type parameters

    • T

    Parameters

    • javascript: string

    Returns Promise<T>

exitToTitleScreen

  • exitToTitleScreen(confirmationButton?: "Yes" | "No"): Promise<void>
  • Parameters

    • Default value confirmationButton: "Yes" | "No" = "No"

    Returns Promise<void>

getElement

  • getElement(selector: string): Promise<any>
  • Parameters

    • selector: string

    Returns Promise<any>

getElements

  • getElements(selector: string, onlyVisible?: boolean): Promise<any>
  • Parameters

    • selector: string
    • Default value onlyVisible: boolean = false

    Returns Promise<any>

getErrors

  • Returns Promise<any>

getGameStateAsJson

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

getServerName

  • Returns Promise<string>

importGame

  • importGame(savePath: string): Promise<void>
  • Parameters

    • savePath: string

    Returns Promise<void>

isButtonVisible

  • isButtonVisible(text: string): Promise<boolean>
  • Parameters

    • text: string

    Returns Promise<boolean>

isOverlayVisible

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

isTitleScreenVisible

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

isVisible

  • isVisible(selector: string): Promise<boolean>
  • Parameters

    • selector: string

    Returns Promise<boolean>

joinMultiplayerDedicatedServer

  • joinMultiplayerDedicatedServer(server?: string): Promise<void>
  • Parameters

    • Default value server: string = "localhost"

    Returns Promise<void>

joinMultiplayerServer

  • joinMultiplayerServer(serverName: string): Promise<void>
  • Parameters

    • serverName: string

    Returns Promise<void>

log

  • log(message1: any, ...messages: any[]): void
  • Parameters

    • message1: any
    • Rest ...messages: any[]

    Returns void

pauseGame

  • Returns Promise<void>

playDedicatedServer

  • playDedicatedServer(gameMode?: GameMode): Promise<void>
  • Parameters

    • Default value gameMode: GameMode = GameMode.Hardcore

    Returns Promise<void>

playImportedGame

  • playImportedGame(savePath: string): Promise<void>
  • Parameters

    • savePath: string

    Returns Promise<void>

playNewGame

pressKey

  • pressKey(key: string): Promise<void>
  • Parameters

    • key: string

    Returns Promise<void>

randomInput

  • randomInput(count: number): Promise<void>
  • Parameters

    • count: number

    Returns Promise<void>

returnToTitleScreen

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

rightClickItemId

  • rightClickItemId(itemId: number): Promise<void>
  • Parameters

    • itemId: number

    Returns Promise<void>

saveStateAndVerifyWithPrevious

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

setMultiplayerIdentifier

  • setMultiplayerIdentifier(identifier: string): Promise<void>
  • Parameters

    • identifier: string

    Returns Promise<void>

setNewGameSeed

  • setNewGameSeed(seed: string): Promise<void>
  • Parameters

    • seed: string

    Returns Promise<void>

start

  • Returns Promise<void>

stop

  • Returns Promise<void>

unpauseGame

  • Returns Promise<void>

waitForNotVisible

  • waitForNotVisible(selector: string, timeout?: number): Promise<void>
  • Parameters

    • selector: string
    • Default value timeout: number = visibleTimeout

    Returns Promise<void>

waitForVisible

  • waitForVisible(selector: string, timeout?: number): Promise<void>
  • Parameters

    • selector: string
    • Default value timeout: number = visibleTimeout

    Returns Promise<void>

waitForVisibleButtonThenClick

  • waitForVisibleButtonThenClick(name: string, timeout?: number): Promise<void>
  • Parameters

    • name: string
    • Default value timeout: number = visibleTimeout

    Returns Promise<void>

waitForVisibleThenClick

  • waitForVisibleThenClick(selector: string, timeout?: number): Promise<void>
  • Parameters

    • selector: string
    • Default value timeout: number = visibleTimeout

    Returns Promise<void>

waitUntilGameEndMenuIsVisible

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

waitUntilGameIsLoaded

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

waitUntilLoadingIsFinished

  • waitUntilLoadingIsFinished(bypassSleep?: boolean): Promise<void>
  • Parameters

    • Default value bypassSleep: boolean = false

    Returns Promise<void>

waitUntilPauseMenuIsShown

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

waitUntilTitleScreenIsVisible

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

Static sleep

  • sleep(milliseconds: number): Promise<unknown>
  • Parameters

    • milliseconds: number

    Returns Promise<unknown>

Generated using TypeDoc