waitForClickable
Warte auf ein Element für die angegebene Anzahl von Millisekunden, bis es anklickbar oder nicht anklickbar ist.
Info
Im Gegensatz zu anderen Element-Befehlen wartet WebdriverIO nicht darauf, dass das Element existiert, um diesen Befehl auszuführen.
Usage
$(selector).waitForClickable({ timeout, reverse, timeoutMsg, interval })
Parameters
| Name | Type | Details | 
|---|---|---|
optionsoptional  | WaitForOptions | waitForEnabled options (optional) | 
options.timeoutoptional  | Number | Zeit in ms (Standardwert basierend auf waitforTimeout Konfigurationswert) | 
options.reverseoptional  | Boolean | wenn true, wartet es auf das Gegenteil (Standard: false) | 
options.timeoutMsgoptional  | String | wenn vorhanden, überschreibt es die Standard-Fehlermeldung | 
options.intervaloptional  | Number | Intervall zwischen Prüfungen (Standard: waitforInterval) | 
Example
waitForClickable.js
it('should detect when element is clickable', async () => {
    const elem = await $('#elem')
    await elem.waitForClickable({ timeout: 3000 });
});
it('should detect when element is no longer clickable', async () => {
    const elem = await $('#elem')
    await elem.waitForClickable({ reverse: true });
});
Returns
- <Boolean>
return:truewenn Element anklickbar ist (oder nicht, wenn Flag gesetzt ist)