Skip to content

Commit 12c905c

Browse files
committed
[js] Update usage docs on {Action,Touch}Sequence
Users should obtain instances using functions exposed on the WebDriver class instead of creating them directly. Fixes #2707
1 parent 1decc7d commit 12c905c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

javascript/node/selenium-webdriver/lib/actions.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,12 @@ function checkModifierKey(key) {
6565
* Class for defining sequences of complex user interactions. Each sequence
6666
* will not be executed until {@link #perform} is called.
6767
*
68-
* Example:
68+
* This class should not be instantiated directly. Instead, obtain an instance
69+
* using {@link ./webdriver.WebDriver#actions() WebDriver.actions()}.
6970
*
70-
* new ActionSequence(driver).
71+
* Sample usage:
72+
*
73+
* driver.actions().
7174
* keyDown(Key.SHIFT).
7275
* click(element1).
7376
* click(element2).
@@ -377,9 +380,12 @@ class ActionSequence {
377380
* Class for defining sequences of user touch interactions. Each sequence
378381
* will not be executed until {@link #perform} is called.
379382
*
380-
* Example:
383+
* This class should not be instantiated directly. Instead, obtain an instance
384+
* using {@link ./webdriver.WebDriver#touchActions() WebDriver.touchActions()}.
385+
*
386+
* Sample usage:
381387
*
382-
* new TouchSequence(driver).
388+
* driver.touchActions().
383389
* tapAndHold({x: 0, y: 0}).
384390
* move({x: 3, y: 4}).
385391
* release({x: 10, y: 10}).

0 commit comments

Comments
 (0)