wait (Vision)

特定の条件下では数秒待つことが必要になる場合があります。

wait関数を使用することができます。

引数waitSecondsを指定せずに使用した場合はデフォルトでshortWaitSecondsが適用されます。 shortWaitSecondsはtestrunファイルで設定することができます。

参照 パラメーター

サンプルコード

サンプルの入手

Wait1.kt

(src/test/kotlin/tutorial/basic/Wait1.kt)

    @Test
    @Order(10)
    fun wait1() {

        scenario {
            case(1) {
                action {
                    describe("Wait for a short time.")
                        .wait()
                }
            }

            case(2) {
                action {
                    describe("Wait for 3.0 seconds.")
                        .wait(3.0)
                }
            }
        }
    }

Link