Skip to content

Commit 21f4d1a

Browse files
AlexGarritytoddtarsi
authored andcommitted
Add Window Timeout text field to command editor, for commands that are flagged as opening new windows
1 parent 2903952 commit 21f4d1a

File tree

4 files changed

+31
-13
lines changed

4 files changed

+31
-13
lines changed

packages/selenium-ide/src/browser/I18N/en/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ const testCore = {
177177
value: 'Value',
178178
windowHandleName: 'Window Handle Name',
179179
windowHandleNameNote: 'Variable name to set to the new window handle',
180+
windowTimeout: 'Window Timeout',
181+
windowTimeoutNote: 'The amount of time to wait for the window to open (in milliseconds)',
180182
commands: 'Commands',
181183
tabCommand: 'Cmd',
182184
tabTarget: 'Target',

packages/selenium-ide/src/browser/I18N/zh/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ const testCore = {
183183
value: '指令值',
184184
windowHandleName: '窗口句柄名称',
185185
windowHandleNameNote: '要设置为新窗口句柄的变量名称',
186+
windowTimeout: '窗口超时',
187+
windowTimeoutNote: '等待窗口打开的时间量(以毫秒为单位)',
186188
commands: '指令集',
187189
tabCommand: '指令',
188190
tabTarget: '关键字',

packages/selenium-ide/src/browser/windows/ProjectEditor/tabs/Tests/TestCommandEditor.tsx

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,32 @@ const CommandEditor: FC<CommandEditorProps> = ({
7070
<ArgField command={correctedCommand} {...props} fieldName="target" />
7171
<ArgField command={correctedCommand} {...props} fieldName="value" />
7272
{command.opensWindow && (
73-
<CommandTextField
74-
command={correctedCommand}
75-
{...props}
76-
fieldName={
77-
intl.formatMessage({
78-
id: languageMap.testCore.windowHandleName,
79-
}) as 'windowHandleName'
80-
}
81-
note={intl.formatMessage({
82-
id: languageMap.testCore.windowHandleNameNote,
83-
})}
84-
/>
73+
<>
74+
<CommandTextField
75+
command={correctedCommand}
76+
{...props}
77+
fieldName={
78+
intl.formatMessage({
79+
id: languageMap.testCore.windowHandleName,
80+
}) as 'windowHandleName'
81+
}
82+
note={intl.formatMessage({
83+
id: languageMap.testCore.windowHandleNameNote,
84+
})}
85+
/>
86+
<CommandTextField
87+
command={correctedCommand}
88+
{...props}
89+
fieldName={
90+
intl.formatMessage({
91+
id: languageMap.testCore.windowTimeout,
92+
}) as 'windowTimeout'
93+
}
94+
note={intl.formatMessage({
95+
id: languageMap.testCore.windowTimeoutNote,
96+
})}
97+
/>
98+
</>
8599
)}
86100
<CommandTextField
87101
command={correctedCommand}

packages/selenium-ide/src/browser/windows/ProjectEditor/tabs/Tests/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface CommandArgFieldProps extends CommandEditorProps {
1717
}
1818

1919
export interface CommandFieldProps extends CommandEditorProps {
20-
fieldName: 'comment' | 'windowHandleName' | LocatorFields
20+
fieldName: 'comment' | 'windowHandleName' | 'windowTimeout' | LocatorFields
2121
note?: string
2222
}
2323

0 commit comments

Comments
 (0)