mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
optionally type char by char (#72666)
This commit is contained in:
parent
01c686cb8d
commit
e8fa2dc9c5
2 changed files with 10 additions and 3 deletions
|
@ -321,7 +321,7 @@ export function SettingsPageProvider({ getService, getPageObjects }) {
|
|||
log.debug(`setIndexPatternField(${indexPatternName})`);
|
||||
const field = await this.getIndexPatternField();
|
||||
await field.clearValue();
|
||||
await field.type(indexPatternName);
|
||||
await field.type(indexPatternName, { charByChar: true });
|
||||
const currentName = await field.getAttribute('value');
|
||||
log.debug(`setIndexPatternField set to ${currentName}`);
|
||||
expect(currentName).to.eql(`${indexPatternName}${expectWildcard ? '*' : ''}`);
|
||||
|
|
|
@ -112,8 +112,15 @@ export class LeadfootElementWrapper {
|
|||
* @param {string|string[]} value
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
async type(value) {
|
||||
await this._leadfootElement.type(value);
|
||||
async type(value, options = { charByChar: false }) {
|
||||
if (options.charByChar) {
|
||||
for (const char of value) {
|
||||
await this._leadfootElement.type(char);
|
||||
await delay(100);
|
||||
}
|
||||
} else {
|
||||
await this._leadfootElement.type(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue