Skip to content

Commit a905d2e

Browse files
committed
renamed webdriver popup commands from next to visible
1 parent b9b11a3 commit a905d2e

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

packages/selenium-ide/src/content/prompt-injector.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ if (window === window.top) {
4040
}
4141
record("assertPrompt", [[event.data.recordedMessage]], "", false, event.data.frameLocation);
4242
if (event.data.recordedResult != null) {
43-
record("webdriverAnswerOnNextPrompt", [[event.data.recordedResult]], "", false, event.data.frameLocation);
43+
record("webdriverAnswerOnVisiblePrompt", [[event.data.recordedResult]], "", false, event.data.frameLocation);
4444
} else {
45-
record("webdriverChooseCancelOnNextPrompt", [[""]], "", false, event.data.frameLocation);
45+
record("webdriverChooseCancelOnVisiblePrompt", [[""]], "", false, event.data.frameLocation);
4646
}
4747
break;
4848
case "confirm":
@@ -53,9 +53,9 @@ if (window === window.top) {
5353
}
5454
record("assertConfirmation", [[event.data.recordedMessage]], "", false, event.data.frameLocation);
5555
if (event.data.recordedResult == true) {
56-
record("webdriverChooseOkOnNextConfirmation", [[""]], "", false, event.data.frameLocation);
56+
record("webdriverChooseOkOnVisibleConfirmation", [[""]], "", false, event.data.frameLocation);
5757
} else {
58-
record("webdriverChooseCancelOnNextConfirmation", [[""]], "", false, event.data.frameLocation);
58+
record("webdriverChooseCancelOnVisibleConfirmation", [[""]], "", false, event.data.frameLocation);
5959
}
6060
break;
6161
case "alert":

packages/selenium-ide/src/neo/models/Command.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class CommandList {
218218
name: "answer on next prompt",
219219
description: "Affects the next alert prompt. This command will send \
220220
the specified answer string to it. If the alert is already \
221-
present, then use \"webdriver answer on next prompt\" instead.",
221+
present, then use \"webdriver answer on visible prompt\" instead.",
222222
target: ArgTypes.answer
223223
}],
224224
[ "assertAlert", {
@@ -327,19 +327,19 @@ class CommandList {
327327
name: "choose cancel on next confirmation",
328328
description: "Affects the next confirmation alert. This command will \
329329
cancel it. If the alert is already present, then use \
330-
\"webdriver choose cancel on next confirmation\" instead."
330+
\"webdriver choose cancel on visible confirmation\" instead."
331331
}],
332332
[ "chooseCancelOnNextPrompt", {
333333
name: "choose cancel on next prompt",
334334
description: "Affects the next alert prompt. This command will cancel \
335335
it. If the alert is already present, then use \"webdriver \
336-
choose cancel on next prompt\" instead."
336+
choose cancel on visible prompt\" instead."
337337
}],
338338
[ "chooseOkOnNextConfirmation", {
339339
name: "choose ok on next confirmation",
340340
description: "Affects the next confirmation alert. This command will accept \
341341
it. If the alert is already present, then use \"webdriver \
342-
choose ok on next confirmation\" instead."
342+
choose ok on visible confirmation\" instead."
343343
}],
344344
[ "click", {
345345
name: "click",
@@ -687,30 +687,30 @@ class CommandList {
687687
target: ArgTypes.selectLocator,
688688
value: ArgTypes.pattern
689689
}],
690-
[ "webdriverAnswerOnNextPrompt", {
691-
name: "webdriver answer on next prompt",
690+
[ "webdriverAnswerOnVisiblePrompt", {
691+
name: "webdriver answer on visible prompt",
692692
description: "Affects a currently showing alert prompt. This command \
693693
instructs Selenium to provide the specified answer to it. \
694694
If the alert has not appeared yet then use \"answer on next \
695695
prompt\" instead.",
696696
target: ArgTypes.answer
697697
}],
698-
[ "webdriverChooseCancelOnNextConfirmation", {
699-
name: "webdriver choose cancel on next confirmation",
698+
[ "webdriverChooseCancelOnVisibleConfirmation", {
699+
name: "webdriver choose cancel on visible confirmation",
700700
description: "Affects a currently showing confirmation alert. This command \
701701
instructs Selenium to cancel it. If the alert has not \
702702
appeared yet then use \"choose cancel on next confirmation\" \
703703
instead."
704704
}],
705-
[ "webdriverChooseCancelOnNextPrompt", {
706-
name: "webdriver choose cancel on next prompt",
705+
[ "webdriverChooseCancelOnVisiblePrompt", {
706+
name: "webdriver choose cancel on visible prompt",
707707
description: "Affects a currently showing alert prompt. This command \
708708
instructs Selenium to cancel it. If the alert has not \
709709
appeared yet then use \"choose cancel on next prompt\" \
710710
instead."
711711
}],
712-
[ "webdriverChooseOkOnNextConfirmation", {
713-
name: "webdriver choose ok on next confirmation",
712+
[ "webdriverChooseOkOnVisibleConfirmation", {
713+
name: "webdriver choose ok on visible confirmation",
714714
description: "Affects a currently showing confirmation alert. This command \
715715
instructs Selenium to accept it. If the alert has not \
716716
appeared yet then use \"choose ok on next confirmation\" \

packages/selianize/__tests__/command.spec.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -571,33 +571,33 @@ describe("command code emitter", () => {
571571
};
572572
return expect(CommandEmitter.emit(command)).resolves.toBe(`await driver.switchTo().alert().then(alert => {alert.getText().then(text => {expect(text).toBe(\`${command.target}\`);});});`);
573573
});
574-
it("should emit `choose ok on next confirmation` command", () => {
574+
it("should emit `choose ok on visible confirmation` command", () => {
575575
const command = {
576-
command: "webdriverChooseOkOnNextConfirmation",
576+
command: "webdriverChooseOkOnVisibleConfirmation",
577577
target: "",
578578
value: ""
579579
};
580580
return expect(CommandEmitter.emit(command)).resolves.toBe("await driver.switchTo().alert().then(alert => {alert.accept();});");
581581
});
582-
it("should emit `choose cancel on next confirmation` command", () => {
582+
it("should emit `choose cancel on visible confirmation` command", () => {
583583
const command = {
584-
command: "webdriverChooseCancelOnNextConfirmation",
584+
command: "webdriverChooseCancelOnVisibleConfirmation",
585585
target: "",
586586
value: ""
587587
};
588588
return expect(CommandEmitter.emit(command)).resolves.toBe("await driver.switchTo().alert().then(alert => {alert.dismiss();});");
589589
});
590-
it("should emit `answer on next prompt` command", () => {
590+
it("should emit `answer on visible prompt` command", () => {
591591
const command = {
592-
command: "webdriverAnswerOnNextPrompt",
592+
command: "webdriverAnswerOnVisiblePrompt",
593593
target: "an answer",
594594
value: ""
595595
};
596596
return expect(CommandEmitter.emit(command)).resolves.toBe(`await driver.switchTo().alert().then(alert => {alert.sendKeys(\`${command.target}\`).then(() => {alert.accept();});});`);
597597
});
598-
it("should emit `choose cancel on next prompt` command", () => {
598+
it("should emit `choose cancel on visible prompt` command", () => {
599599
const command = {
600-
command: "webdriverChooseCancelOnNextPrompt",
600+
command: "webdriverChooseCancelOnVisiblePrompt",
601601
target: "",
602602
value: ""
603603
};

packages/selianize/src/command.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ const emitters = {
8383
assertNotText: emitVerifyNotText,
8484
assertPrompt: emitAssertAlert,
8585
assertConfirmation: emitAssertAlert,
86-
webdriverAnswerOnNextPrompt: emitAnswerOnNextPrompt,
87-
webdriverChooseOkOnNextConfirmation: emitChooseOkOnNextConfirmation,
88-
webdriverChooseCancelOnNextConfirmation: emitChooseCancelOnNextConfirmation,
89-
webdriverChooseCancelOnNextPrompt: emitChooseCancelOnNextConfirmation,
86+
webdriverAnswerOnVisiblePrompt: emitAnswerOnNextPrompt,
87+
webdriverChooseOkOnVisibleConfirmation: emitChooseOkOnNextConfirmation,
88+
webdriverChooseCancelOnVisibleConfirmation: emitChooseCancelOnNextConfirmation,
89+
webdriverChooseCancelOnVisiblePrompt: emitChooseCancelOnNextConfirmation,
9090
editContent: emitEditContent,
9191
submit: emitSubmit,
9292
answerOnNextPrompt: skip,

0 commit comments

Comments
 (0)