Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 786 Bytes

missing-perform.md

File metadata and controls

24 lines (17 loc) · 786 Bytes

Enforce valid browser.actions() usage

Ensure perform() is called on browser.actions() chain of actions.

Rule details

This rule triggers an error if there is no perform() at the end of the browser.actions() chain. Note that there has to be at least one applied action to trigger the rule. In other words, var actions = browser.actions(); is considered valid since it is quite a common pattern.

👎 The following patterns are considered errors:

browser.actions().click();
browser.actions().mouseMove(elm);

👍 The following patterns are not errors:

var actions = browser.actions();
browser.actions().click(elm).perform();
browser.actions().mouseMove(elm).click().perform();
browser.actions().dragAndDrop(elm1, elm2).perform();